", # Prompt
max_tokens=512, # Generate up to 512 tokens
stop=[""], # Example stop token - not necessarily correct for this specific model! Please check before using.
echo=True # Whether to echo the prompt
)
# Chat Completion API
llm = Llama(model_path="./Q4_0/Q4_0-00001-of-00009.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
llm.create_chat_completion(
messages = [
{"role": "system", "content": "You are a story writing assistant."},
{
"role": "user",
"content": "Write a story about llamas."
}
]
)
```
## How to use with LangChain
Here are guides on using llama-cpp-python and ctransformers with LangChain:
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
# Original model card: Yi-1.5-34B-Chat
π GitHub β’
πΎ Discord β’
π€ Twitter β’
π¬ WeChat
π Paper β’
πͺ Tech Blog β’
π FAQ β’
π Learning Hub
# Intro
Yi-1.5 is an upgraded version of Yi. It is continuously pre-trained on Yi with a high-quality corpus of 500B tokens and fine-tuned on 3M diverse fine-tuning samples.
Compared with Yi, Yi-1.5 delivers stronger performance in coding, math, reasoning, and instruction-following capability, while still maintaining excellent capabilities in language understanding, commonsense reasoning, and reading comprehension.
| Model | Context Length | Pre-trained Tokens |
| :-: |
| Yi-1.5 | 4K, 16K, 32K | 3.6T |
# Models
- Chat models
| Name | Download |
| - | -- |
| Yi-1.5-34B-Chat | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-34B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-9B-Chat | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-9B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-6B-Chat | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
- Base models
| Name | Download |
| -- | -- |
| Yi-1.5-34B | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-34B-32K | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-9B | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-9B-32K | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
| Yi-1.5-6B | β’ [π€ Hugging Face](https://huggingface.co./collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π wisemodel](https://wisemodel.cn/organization/01.AI) |
# Benchmarks
- Chat models
Yi-1.5-34B-Chat is on par with or excels beyond larger models in most benchmarks.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/656d9adce8bf55919aca7c3f/KcsJ9Oc1VnEmfCDEJc5cd.png)
Yi-1.5-9B-Chat is the top performer among similarly sized open-source models.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/656d9adce8bf55919aca7c3f/xf6pLg5jqRCwjlh6m3t6_.png)
- Base models
Yi-1.5-34B is on par with or excels beyond larger models in some benchmarks.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/656d9adce8bf55919aca7c3f/BwU7QM-03dZvZzwdIE1xY.png)
Yi-1.5-9B is the top performer among similarly sized open-source models.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/656d9adce8bf55919aca7c3f/y-EYSYPT-3aWLJ0x8R94F.png)
# Quick Start
For getting up and running with Yi-1.5 models quickly, see [README](https://github.com/01-ai/Yi-1.5).