初始化项目,由ModelHub XC社区提供模型
Model: QwenCollection/Ragas-critic-llm-Qwen1.5-GPTQ Source: Original Platform
This commit is contained in:
37
README.md
Normal file
37
README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
---
|
||||
|
||||
### Ragas Critic Model
|
||||
|
||||
Model to be used as part of ragas synthetic test data generation to replace GPT-4 as critic model.
|
||||
To know more about this visit [ragas](https://docs.ragas.io/en/stable/concepts/testset_generation.html)
|
||||
|
||||
|
||||
### Take it for a spin
|
||||
|
||||
```python
|
||||
|
||||
|
||||
from langchain_community.llms import VLLM
|
||||
|
||||
llm = VLLM(
|
||||
model="explodinggradients/Ragas-critic-llm-Qwen1.5-GPTQ",
|
||||
trust_remote_code=True, # mandatory for hf models
|
||||
max_new_tokens=512,
|
||||
top_k=10,
|
||||
top_p=0.95,
|
||||
temperature=0.0,)
|
||||
|
||||
|
||||
template = "<|im_start|>user\n{}<|im_end|>\n<|im_start|>assistant\n"
|
||||
input_text = """"""
|
||||
|
||||
simple_instruction = template.format(input_text)
|
||||
|
||||
llm.invoke(simple_instruction)
|
||||
|
||||
```
|
||||
|
||||
### Generate synthetic QA pairs from Documents
|
||||
Use the notebook [here](https://docs.ragas.io/en/stable/howtos/customisations/ragas_custom_model.html)
|
||||
Reference in New Issue
Block a user