Instructions to use 01-ai/Yi-1.5-9B-32K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 01-ai/Yi-1.5-9B-32K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="01-ai/Yi-1.5-9B-32K")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("01-ai/Yi-1.5-9B-32K") model = AutoModelForCausalLM.from_pretrained("01-ai/Yi-1.5-9B-32K", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 01-ai/Yi-1.5-9B-32K with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "01-ai/Yi-1.5-9B-32K" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "01-ai/Yi-1.5-9B-32K", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/01-ai/Yi-1.5-9B-32K
- SGLang
How to use 01-ai/Yi-1.5-9B-32K with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "01-ai/Yi-1.5-9B-32K" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "01-ai/Yi-1.5-9B-32K", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "01-ai/Yi-1.5-9B-32K" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "01-ai/Yi-1.5-9B-32K", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 01-ai/Yi-1.5-9B-32K with Docker Model Runner:
docker model run hf.co/01-ai/Yi-1.5-9B-32K
Chen Chongyu commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -43,11 +43,11 @@ Model | Context Length | Pre-trained Tokens
|
|
| 43 |
|
| 44 |
| Name | Download |
|
| 45 |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 46 |
-
| Yi-1.5-34B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 47 |
-
| Yi-1.5-34B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 48 |
-
| Yi-1.5-9B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 49 |
-
| Yi-1.5-9B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 50 |
-
| Yi-1.5-6B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 51 |
|
| 52 |
</div>
|
| 53 |
|
|
@@ -57,11 +57,11 @@ Model | Context Length | Pre-trained Tokens
|
|
| 57 |
|
| 58 |
| Name | Download |
|
| 59 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 60 |
-
| Yi-1.5-34B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 61 |
-
| Yi-1.5-34B-32K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 62 |
-
| Yi-1.5-9B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 63 |
-
| Yi-1.5-9B-32K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 64 |
-
| Yi-1.5-6B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [
|
| 65 |
|
| 66 |
</div>
|
| 67 |
|
|
|
|
| 43 |
|
| 44 |
| Name | Download |
|
| 45 |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 46 |
+
| Yi-1.5-34B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI)|
|
| 47 |
+
| Yi-1.5-34B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 48 |
+
| Yi-1.5-9B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 49 |
+
| Yi-1.5-9B-Chat-16K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 50 |
+
| Yi-1.5-6B-Chat | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 51 |
|
| 52 |
</div>
|
| 53 |
|
|
|
|
| 57 |
|
| 58 |
| Name | Download |
|
| 59 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 60 |
+
| Yi-1.5-34B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 61 |
+
| Yi-1.5-34B-32K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 62 |
+
| Yi-1.5-9B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 63 |
+
| Yi-1.5-9B-32K | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 64 |
+
| Yi-1.5-6B | β’ [π€ Hugging Face](https://huggingface.co/collections/01-ai/yi-15-2024-05-663f3ecab5f815a3eaca7ca8) β’ [π€ ModelScope](https://www.modelscope.cn/organization/01ai) β’ [π£ wisemodel](https://wisemodel.cn/organization/01.AI) |
|
| 65 |
|
| 66 |
</div>
|
| 67 |
|