Instructions to use BabyChou/Yi-VL-34B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BabyChou/Yi-VL-34B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BabyChou/Yi-VL-34B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("BabyChou/Yi-VL-34B") model = AutoModelForCausalLM.from_pretrained("BabyChou/Yi-VL-34B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BabyChou/Yi-VL-34B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BabyChou/Yi-VL-34B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BabyChou/Yi-VL-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BabyChou/Yi-VL-34B
- SGLang
How to use BabyChou/Yi-VL-34B 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 "BabyChou/Yi-VL-34B" \ --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": "BabyChou/Yi-VL-34B", "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 "BabyChou/Yi-VL-34B" \ --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": "BabyChou/Yi-VL-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BabyChou/Yi-VL-34B with Docker Model Runner:
docker model run hf.co/BabyChou/Yi-VL-34B
Adding `safetensors` variant of this model
#2
by SFconvertbot - opened
- .gitattributes +8 -0
- model-00001-of-00008.safetensors +3 -0
- model-00002-of-00008.safetensors +3 -0
- model-00003-of-00008.safetensors +3 -0
- model-00004-of-00008.safetensors +3 -0
- model-00005-of-00008.safetensors +3 -0
- model-00006-of-00008.safetensors +3 -0
- model-00007-of-00008.safetensors +3 -0
- model-00008-of-00008.safetensors +3 -0
- model.safetensors.index.json +0 -0
.gitattributes
CHANGED
|
@@ -1,2 +1,10 @@
|
|
| 1 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.model filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.model filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
model-00005-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
model-00008-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
model-00006-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
model-00007-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
model-00003-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
model-00002-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
model-00004-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
model-00001-of-00008.safetensors filter=lfs diff=lfs merge=lfs -text
|
model-00001-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a893651bcb354668dee31976e42d56016cdf5a1d4c577d17ad6deed0da32eab
|
| 3 |
+
size 9975341688
|
model-00002-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f22ce5c15ee259410749aa1fd01ac3a7e8aaa783c6be27c6a0d1498d290e2ff9
|
| 3 |
+
size 9909310352
|
model-00003-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9992f546074070f3e082ac95e2f3df50388f13ea4c484740b45ce2ee09cd938c
|
| 3 |
+
size 9747800992
|
model-00004-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6522bcf38a2c15948211277954c4a8259afb46a8d9133d2c22807d2db5c41a64
|
| 3 |
+
size 9747829904
|
model-00005-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71e33b7e1b223a9e9d17ffaeeab9d27b84310fb5746bf48a2c53a63e1dea542c
|
| 3 |
+
size 9747829904
|
model-00006-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c83ca377dee0b8d95fdb6270eb6b212318e6ee9ca9012a5030810a58535db13
|
| 3 |
+
size 9938670728
|
model-00007-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2da08bd662d6a0be214d18c457fbe99a2703992f581a3079e13715416584c61b
|
| 3 |
+
size 9991593968
|
model-00008-of-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bc2e233fe71bbbecab2893e6292888c6fda14c26b88cab3471d8895af6121ee
|
| 3 |
+
size 1104297512
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|