{"repo": "01-ai/yi", "files": {"README.md": {"f73194cc16e82df438bc01240b8e4b622209f3eb": {"t": 1785747293.131702, "n": 82748, "h": "21182f132aeb45fb", "c": "
\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n 💪 Learn at Yi Tech Blog \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\n> **💡 Tip**: If you want to get started with the Yi model and explore different methods for inference, check out the [Yi Cookbook](https://github.com/01-ai/Yi/tree/main/Cookbook).\n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "8cb87023efef1541f4c2c45728820b311a350167": {"t": 1785772214.8354723, "n": 82748, "h": "21182f132aeb45fb", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n 💪 Learn at Yi Tech Blog \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\n> **💡 Tip**: If you want to get started with the Yi model and explore different methods for inference, check out the [Yi Cookbook](https://github.com/01-ai/Yi/tree/main/Cookbook).\n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "899869be5b970442f102edd28dee1b2bf3c0127c": {"t": 1785772217.3443909, "n": 82769, "h": "3ebfcfb97ba05a7e", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n 💪 Learn at Yi Tech Blog \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\n> **💡 Tip**: If you want to get started with the Yi model and explore different methods for inference, check out the [Yi Cookbook](https://github.com/01-ai/Yi/tree/main/Cookbook).\n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "8673eeaf4875635871ee98261e4cf9997bc87f7f": {"t": 1785772218.8984287, "n": 82769, "h": "d6ad59bd416beb35", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n 💪 Learn at Yi Tech Blog \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. If you want more inference refer to the [Cookbook](https://github.com/01-ai/Yi/tree/main/Cookbook)\n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "88329a68cd0ebea42527ee34d03fd9145c76925f": {"t": 1785772224.0695841, "n": 82671, "h": "a799951a9557918b", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n 💪 Learn at Yi Tech Blog \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "864b0acb1f619428025cc21043d2dea0e61e543e": {"t": 1785772227.0652196, "n": 82576, "h": "daea9cd6dcc3f28b", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "6f8c14417114fe34658b73340cafc022c555c946": {"t": 1785772229.7019384, "n": 82576, "h": "234cb495b6717421", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "af2bbebda6796e614c38f8f33fe93425afbd6f34": {"t": 1785772231.4367714, "n": 82562, "h": "01e88316ce3b76e4", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "11d140d641d18e1190caad2d5170da3b76c9e4f6": {"t": 1785772233.5502985, "n": 82351, "h": "8bd529964b3fe490", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi-1.5 series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\nIf you create derivative works based on this model, please include the following attribution in your derivative works:\n\n This work is a derivative of [The Yi Series Model You Base On] by 01.AI, used under the Apache 2.0 License.\n\n[\n Back to top ⬆️ ] \n
\n\n"}, "3fceb848f1b996978b5ee718492031ad7576fea5": {"t": 1785772236.1033478, "n": 81892, "h": "2d6807f6d76cf7c3", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE), which means the Yi series models are free for personal usage, academic purposes, and commercial use. \n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n"}, "236299c9b8750a34dcf44cc28b79be8008098000": {"t": 1785772238.273028, "n": 82255, "h": "b7b36a6304c727df", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "4e30c864daf2025d2144aa442edd0a7aa1293174": {"t": 1785772241.617908, "n": 82261, "h": "8cb71366a6972449", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "2610c23b54964d647b51981c26a347ba39e7c092": {"t": 1785772243.8615284, "n": 82260, "h": "65b21bcf9456cbc7", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "bd0926c5a131fa2ada88f9857d07f9c9a7e6de43": {"t": 1785772247.8749275, "n": 82260, "h": "65b21bcf9456cbc7", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "5ec589115e9c937cc4f89408c0c3edbad116e841": {"t": 1785772250.6032727, "n": 82258, "h": "d0e80a7f681ffbf9", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "bed43e91885977e05ff28d29e1f8af99ee759c20": {"t": 1785772252.316517, "n": 82026, "h": "d486d338bdd053af", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣 wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "6c7bc38fa7db2845b274a8ac59887ff5dfba50b8": {"t": 1785772254.0644221, "n": 82014, "h": "5b798ef19b746930", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "160bcff9b226acfea9ae1d11c4b5330d4a4b36e4": {"t": 1785772255.6455142, "n": 82013, "h": "45df1405ed86979a", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 wismodel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "ac833dd7ee0f3830fe9aafc024198303914556be": {"t": 1785772259.8051965, "n": 82015, "h": "6404b53e1884c57f", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • 🟣 WiseModel\n
\n\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download |\n|---|---|\n|Yi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat) |\n|Yi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-4bits) |\n|Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-34B-Chat-8bits) |\n|Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat) |\n|Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-4bits) |\n|Yi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary) • [🟣wisemodel](https://wisemodel.cn/models/01.AI/Yi-6B-Chat-8bits) |\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "91a7ae51d75a39eb40bbb2e7ac9d1e72c5097e16": {"t": 1785772282.766718, "n": 81471, "h": "80c0a5ab5fafc249", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n\n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n\n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n\nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "43719d94f82799b7d77fd34db1307db28118195a": {"t": 1785772284.9038875, "n": 62107, "h": "08418d2b687c0546", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe code and weights of the Yi series models are distributed under the [Apache 2.0 license](https://github.com/01-ai/Yi/blob/main/LICENSE).\n\n[\n Back to top ⬆️ ] \n
\n"}, "845a0ffb37528402199c68687ecbbfb675b039df": {"t": 1785772286.5976381, "n": 62511, "h": "0ac6d90915bcb146", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "517b411e18f4070c56c6ef43a9dc977a709d3b26": {"t": 1785772288.2683258, "n": 62336, "h": "4ecc9a6c026aa39d", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "d89f53c4ca23bbaa062ebe1ab7f2aeff54db8aee": {"t": 1785772289.749379, "n": 62167, "h": "8b3c48d4c565f7ea", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "87ab46f0f3e054c7d161ece1492c77a1789d8b8a": {"t": 1785772291.44459, "n": 62174, "h": "974cf9506b1411eb", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "731b2af8583cba38d6544ebf909d7c85545f75a8": {"t": 1785772314.50425, "n": 61434, "h": "2886020835b116a3", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [FAQ](#faq)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### FAQ\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "b10bf347b810b6ab1a7e73a7e1a1223c757e7326": {"t": 1785772316.102418, "n": 57930, "h": "f0c73b2a1ee7b6ad", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### Learning hub\n\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "5ed73fe931e7b95ad6dbd4d8091cd21b199d9bbb": {"t": 1785772319.0405715, "n": 57930, "h": "263bf6e1f5abae34", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.| Model | \nIntro | \nDefault context window | \nPretrained tokens | \nTraining Data Date | \n
|---|---|---|---|---|
| 6B series models | \nThey are suitable for personal and academic use. | \n4K | \n3T | \nUp to June 2023 | \n
| 9B series models | \nIt is the best at coding and math in the Yi series models. | \nYi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | \n||
| 34B series models | \nThey are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability. | \n3T | \n
[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### Learning hub\n\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}, "e3e47d27d65641181e2aeb600304181dd2a7230a": {"t": 1785772320.5144668, "n": 57748, "h": "2c22e94388469658", "c": "\n  English  | 中文\n
\n\n🤗 Hugging Face • 🤖 ModelScope • ✡️ WiseModel\n
\n\n\n 👩🚀 Ask questions or discuss ideas on GitHub \n
\n\n\n 👋 Join us on 👾 Discord or 💬 WeChat \n
\n\n\n 📝 Check out Yi Tech Report \n
\n\n\n 📚 Grow at Yi Learning Hub \n
\n\n\n\n[\n Back to top ⬆️ ] \n
\n\n## News \n\nYi-9B-200K is open-sourced and available to the public.Yi-9B is open-sourced and available to the public.Yi-9B stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.\nYi-VL-34B and Yi-VL-6B, are open-sourced and available to the public.Yi-VL-34B has ranked first among all existing open-source models in the latest benchmarks, including MMMU and CMMMU (based on data available up to January 2024).\nYi-6B-200K and Yi-34B-200K, are open-sourced and available to the public.Yi-6B and Yi-34B, are open-sourced and available to the public.[\n Back to top ⬆️ ] \n
\n\n## Models\n\nYi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements. \n\nIf you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).\n\n### Chat models\n\n| Model | Download \n|---|---\nYi-34B-Chat\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)\nYi-34B-Chat-4bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)\nYi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)\nYi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)\nYi-6B-Chat-4bits |\t• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)\nYi-6B-Chat-8bits\t| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)\n\n\n - 4-bit series models are quantized by AWQ.[\n Back to top ⬆️ ] \n
\n\n\n# How to use Yi?\n\n- [Quick start](#quick-start)\n - [Choose your path](#choose-your-path)\n - [pip](#quick-start---pip)\n - [docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n - [llama.cpp](#quick-start---llamacpp)\n - [Web demo](#web-demo)\n- [Fine-tuning](#fine-tuning)\n- [Quantization](#quantization)\n- [Deployment](#deployment)\n- [Learning hub](#learning-hub)\n\n## Quick start\n\nGetting up and running with Yi models is simple with multiple choices available. \n\n### Choose your path\n\nSelect one of the following paths to begin your journey with Yi!\n\n \n\n#### 🎯 Deploy Yi locally\n\nIf you prefer to deploy Yi models locally, \n\n - 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:\n - [pip](#quick-start---pip)\n - [Docker](#quick-start---docker)\n - [conda-lock](#quick-start---conda-lock)\n\n - 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).\n\n#### 🎯 Not to deploy Yi locally\n\nIf you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.\n\n##### 🙋♀️ Run Yi with APIs\n\nIf you want to explore more features of Yi, you can adopt one of these methods:\n\n- Yi APIs (Yi official)\n - [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!\n\n- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)\n\n##### 🙋♀️ Run Yi in playground\n\nIf you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:\n \n - [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n \n - [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate) \n\n##### 🙋♀️ Chat with Yi\n\n If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:\n\n- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)\n - No registration is required.\n\n- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)\n - Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).\n\n[\n Back to top ⬆️ ] \n
\n\n### Quick start - pip \n\nThis tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.\n\n#### Step 0: Prerequisites\n \n- Make sure Python 3.10 or a later version is installed.\n\n- If you want to run other Yi models, see [software and hardware requirements](#deployment).\n\n#### Step 1: Prepare your environment \n\nTo set up the environment and install the required packages, execute the following command.\n\n```bash\ngit clone https://github.com/01-ai/Yi.git\ncd yi\npip install -r requirements.txt\n```\n\n#### Step 2: Download the Yi model\n\nYou can download the weights and tokenizer of Yi models from the following sources:\n\n- [Hugging Face](https://huggingface.co/01-ai)\n- [ModelScope](https://www.modelscope.cn/organization/01ai/)\n- [WiseModel](https://wisemodel.cn/organization/01.AI)\n\n#### Step 3: Perform inference\n\nYou can perform inference with Yi chat or base models as below.\n\n##### Perform inference with Yi chat model\n\n1. Create a file named `quick_start.py` and copy the following content to it.\n\n ```python\n from transformers import AutoModelForCausalLM, AutoTokenizer\n\n model_path = '[\n Back to top ⬆️ ] \n
\n\n### Quick start - Docker \nMake sure you've installed Docker and nvidia-container-toolkit.
\n\ndocker run -it --gpus all \\\n-v <your-model-path>: /models\nghcr.io/01-ai/yi:latest\n\nAlternatively, you can pull the Yi Docker image from registry.lingyiwanwu.com/ci/01-ai/yi:latest.
You can perform inference with Yi chat or base models as below.
\n \nThe steps are similar to pip - Perform inference with Yi chat model.
\nNote that the only difference is to set model_path = '<your-model-mount-path>' instead of model_path = '<your-model-path>'.
The steps are similar to pip - Perform inference with Yi base model.
\nNote that the only difference is to set --model <your-model-mount-path>' instead of model <your-model-path>.
conda-lock to generate fully reproducible lock files for conda environments. ⬇️micromamba for installing these dependencies.\nmicromamba install -y -n yi -f conda-lock.yml to create a conda environment named yi and install the necessary dependencies.\n[\n Back to top ⬆️ ] \n
\n\n### Web demo\n\nYou can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).\n\n[Step 1: Prepare your environment](#step-1-prepare-your-environment). \n\n[Step 2: Download the Yi model](#step-2-download-the-yi-model).\n\nStep 3. To start a web service locally, run the following command.\n\n```bash\npython demo/web_demo.py -c[\n Back to top ⬆️ ] \n
\n\n### Fine-tuning\n\n```bash\nbash finetune/scripts/run_sft_Yi_6b.sh\n```\n\nOnce finished, you can compare the finetuned model and the base model with the following command:\n\n```bash\nbash finetune/scripts/run_eval.sh\n```\n[\n Back to top ⬆️ ] \n
\n\n### Quantization\n\n#### GPT-Q\n```bash\npython quantization/gptq/quant_autogptq.py \\\n --model /base_model \\\n --output_dir /quantized_model \\\n --trust_remote_code\n```\n\nOnce finished, you can then evaluate the resulting model as follows:\n\n```bash\npython quantization/gptq/eval_quantized_model.py \\\n --model /quantized_model \\\n --trust_remote_code\n```\n\n[\n Back to top ⬆️ ] \n
\n\n### Deployment\n\nIf you want to deploy Yi models, make sure you meet the software and hardware requirements. \n\n#### Software requirements\n\nBefore using Yi quantized models, make sure you've installed the correct software listed below.\n\n| Model | Software\n|---|---\nYi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)\nYi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)\n\n#### Hardware requirements\n\nBefore deploying Yi in your environment, make sure your hardware meets the following requirements.\n\n##### Chat models\n\n| Model | Minimum VRAM | Recommended GPU Example |\n|:----------------------|:--------------|:-------------------------------------:|\n| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB)[\n Back to top ⬆️ ] \n
\n\n### Learning hub\n\n[\n Back to top ⬆️ ] \n
\n\n### Downstream\n\n> 💡 Tip\n> \n> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.\n>\n> - To help others quickly understand your work, it is recommended to use the format of `[\n Back to top ⬆️ ] \n
\n\n## Tech report\n\nFor detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).\n\n### Citation\n\n```\n@misc{ai2024yi,\n title={Yi: Open Foundation Models by 01.AI},\n author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},\n year={2024},\n eprint={2403.04652},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n```\n\n## Benchmarks \n\n- [Chat model performance](#chat-model-performance)\n- [Base model performance](#base-model-performance)\n\n### Chat model performance\n\nYi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.\n\n \n\n[\n Back to top ⬆️ ] \n
\n\n# Who can use Yi?\n\nEveryone! 🙌 ✅\n\n- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)\n \n- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.\n\n[\n Back to top ⬆️ ] \n
\n\n# Misc.\n\n### Acknowledgments\n\nA heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.\n\n[](https://github.com/01-ai/yi/graphs/contributors)\n\n[\n Back to top ⬆️ ] \n
\n\n### Disclaimer\n\nWe use data compliance checking algorithms during the training process, to\nensure the compliance of the trained model to the best of our ability. Due to\ncomplex data and the diversity of language model usage scenarios, we cannot\nguarantee that the model will generate correct, and reasonable output in all\nscenarios. Please be aware that there is still a risk of the model producing\nproblematic outputs. We will not be responsible for any risks and issues\nresulting from misuse, misguidance, illegal usage, and related misinformation,\nas well as any associated data security concerns.\n\n[\n Back to top ⬆️ ] \n
\n\n### License\n\nThe source code in this repo is licensed under the [Apache 2.0\nlicense](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).\nFor free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).\n\n[\n Back to top ⬆️ ] \n
\n"}}}}