Instructions to use Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2") model = AutoModelForCausalLM.from_pretrained("Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2
- SGLang
How to use Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2 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 "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2 with Docker Model Runner:
docker model run hf.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
<div align="center">
|
| 5 |
|
| 6 |
<picture>
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
+
**Exllamav2** quant (**exl2** / **2.2 bpw**) made with ExLlamaV2 v0.0.21
|
| 5 |
+
|
| 6 |
+
Other EXL2 quants:
|
| 7 |
+
| **Quant** | **Model Size** | **lm_head** |
|
| 8 |
+
| ----- | ---------- | ------- |
|
| 9 |
+
|<center>**[2.2](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_2bpw_exl2)**</center> | <center>10049 MB</center> | <center>6</center> |
|
| 10 |
+
|<center>**[2.5](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-2_5bpw_exl2)**</center> | <center>11195 MB</center> | <center>6</center> |
|
| 11 |
+
|<center>**[3.0](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-3_0bpw_exl2)**</center> | <center>13193 MB</center> | <center>6</center> |
|
| 12 |
+
|<center>**[3.5](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-3_5bpw_exl2)**</center> | <center>15187 MB</center> | <center>6</center> |
|
| 13 |
+
|<center>**[3.75](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-3_75bpw_exl2)**</center> | <center>16186 MB</center> | <center>6</center> |
|
| 14 |
+
|<center>**[4.0](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-4_0bpw_exl2)**</center> | <center>17183 MB</center> | <center>6</center> |
|
| 15 |
+
|<center>**[4.25](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-4_25bpw_exl2)**</center> | <center>18179 MB</center> | <center>6</center> |
|
| 16 |
+
|<center>**[5.0](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-5_0bpw_exl2)**</center> | <center>21171 MB</center> | <center>6</center> |
|
| 17 |
+
|<center>**[6.0](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-6_0bpw_exl2)**</center> | <center>25231 MB</center> | <center>8</center> |
|
| 18 |
+
|<center>**[6.5](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-6_5bpw_exl2)**</center> | <center>27111 MB</center> | <center>8</center> |
|
| 19 |
+
|<center>**[8.0](https://huggingface.co/Zoyd/01-ai_Yi-1.5-34B-Chat-16K-8_0bpw_exl2)**</center> | <center>29540 MB</center> | <center>8</center> |
|
| 20 |
+
|
| 21 |
<div align="center">
|
| 22 |
|
| 23 |
<picture>
|