Instructions to use hf-internal-testing/tiny-random-FuyuForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-FuyuForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hf-internal-testing/tiny-random-FuyuForCausalLM")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("hf-internal-testing/tiny-random-FuyuForCausalLM") model = AutoModelForImageTextToText.from_pretrained("hf-internal-testing/tiny-random-FuyuForCausalLM") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hf-internal-testing/tiny-random-FuyuForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hf-internal-testing/tiny-random-FuyuForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/tiny-random-FuyuForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hf-internal-testing/tiny-random-FuyuForCausalLM
- SGLang
How to use hf-internal-testing/tiny-random-FuyuForCausalLM 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 "hf-internal-testing/tiny-random-FuyuForCausalLM" \ --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": "hf-internal-testing/tiny-random-FuyuForCausalLM", "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 "hf-internal-testing/tiny-random-FuyuForCausalLM" \ --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": "hf-internal-testing/tiny-random-FuyuForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hf-internal-testing/tiny-random-FuyuForCausalLM with Docker Model Runner:
docker model run hf.co/hf-internal-testing/tiny-random-FuyuForCausalLM
Update tiny models for FuyuForCausalLM
#1
by hf-transformers-bot - opened
- config.json +2 -3
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -27,8 +27,6 @@
|
|
| 27 |
"rope_scaling": null,
|
| 28 |
"rope_theta": 25000.0,
|
| 29 |
"text_config": {
|
| 30 |
-
"bos_token_id": 71013,
|
| 31 |
-
"eos_token_id": 71013,
|
| 32 |
"hidden_act": "gelu",
|
| 33 |
"hidden_size": 32,
|
| 34 |
"intermediate_size": 37,
|
|
@@ -36,7 +34,8 @@
|
|
| 36 |
"model_type": "persimmon",
|
| 37 |
"num_attention_heads": 4,
|
| 38 |
"num_hidden_layers": 2,
|
| 39 |
-
"pad_token_id": 0
|
|
|
|
| 40 |
},
|
| 41 |
"tie_word_embeddings": false,
|
| 42 |
"torch_dtype": "float32",
|
|
|
|
| 27 |
"rope_scaling": null,
|
| 28 |
"rope_theta": 25000.0,
|
| 29 |
"text_config": {
|
|
|
|
|
|
|
| 30 |
"hidden_act": "gelu",
|
| 31 |
"hidden_size": 32,
|
| 32 |
"intermediate_size": 37,
|
|
|
|
| 34 |
"model_type": "persimmon",
|
| 35 |
"num_attention_heads": 4,
|
| 36 |
"num_hidden_layers": 2,
|
| 37 |
+
"pad_token_id": 0,
|
| 38 |
+
"vocab_size": 99
|
| 39 |
},
|
| 40 |
"tie_word_embeddings": false,
|
| 41 |
"torch_dtype": "float32",
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:caa01bcd251931627892a9728493cf115bb1022a2a7f9e493cd6e21a9618add5
|
| 3 |
+
size 430256
|