Image-Text-to-Text
Transformers
Safetensors
muse_spark
muse-spark
testing
random-weights
conversational
Instructions to use hf-internal-testing/tiny-muse-spark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-muse-spark 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-muse-spark") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hf-internal-testing/tiny-muse-spark") model = AutoModelForMultimodalLM.from_pretrained("hf-internal-testing/tiny-muse-spark", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hf-internal-testing/tiny-muse-spark 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-muse-spark" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/tiny-muse-spark", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/hf-internal-testing/tiny-muse-spark
- SGLang
How to use hf-internal-testing/tiny-muse-spark 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-muse-spark" \ --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": "hf-internal-testing/tiny-muse-spark", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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-muse-spark" \ --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": "hf-internal-testing/tiny-muse-spark", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use hf-internal-testing/tiny-muse-spark with Docker Model Runner:
docker model run hf.co/hf-internal-testing/tiny-muse-spark
|
Download README.md from hf-internal-testing/tiny-muse-spark: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/hf-internal-testing/tiny-muse-spark/resolve/main/README.md
- Command line
-
hf download hf://hf-internal-testing/tiny-muse-spark/README.md
-
curl -L -o README.md https://huggingface.co/hf-internal-testing/tiny-muse-spark/resolve/main/README.md
1.48 kB
| library_name: transformers | |
| tags: | |
| - muse-spark | |
| - testing | |
| - random-weights | |
| # muse-spark-tiny | |
| **Randomly initialised** tiny Muse Spark checkpoint for shape/plumbing/TP smoke tests. | |
| **No weight comes from the released checkpoint** — do not use for any quality evaluation. | |
| Built from the release's `config.json` with exactly two knobs shrunk: | |
| | | release | tiny | | |
| |---|---|---| | |
| | `text_config.num_hidden_layers` | 62 | **6** | | |
| | `text_config.num_local_experts` | 256 | **8** | | |
| | parameters | 822 B | **9.48 B** (1.15 %) | | |
| | size (bf16) | 1644 GB | **18.97 GB**, 5 shards | | |
| Everything else matches the release: vision tower 50 layers, audio encoder 4 stages, | |
| `hidden_size` 8192, `moe_intermediate_size` 4096, vocab 202048 with an untied head, | |
| plus the release tokenizer, processor config and chat template. | |
| The per-layer lists `layer_types`, `layer_rope_theta` and `mlp_layer_types` were dropped | |
| from the source config so `MuseSparkTextConfig.__post_init__` re-derives them at depth 6 | |
| rather than truncating the 62-entry lists — the `[w, w, w, 0]` sliding/NoPE pattern is | |
| counted backward from the last layer, so NoPE correctly lands on layers 1 and 5. | |
| Parameter split: | |
| | component | params | | |
| |---|---| | |
| | text MoE blocks | 2.819 B | | |
| | vision tower + projector | 1.928 B | | |
| | embeddings | 1.655 B | | |
| | lm_head (untied) | 1.655 B | | |
| | text attention + norms | 1.309 B | | |
| | audio encoder | 0.118 B | | |
| Generated by `make_tiny_checkpoint.py` with `torch.manual_seed(0)`. | |