Instructions to use hf-internal-testing/tiny-muse-glimmer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-muse-glimmer 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-glimmer")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hf-internal-testing/tiny-muse-glimmer") model = AutoModelForMultimodalLM.from_pretrained("hf-internal-testing/tiny-muse-glimmer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hf-internal-testing/tiny-muse-glimmer 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-glimmer" # 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-muse-glimmer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hf-internal-testing/tiny-muse-glimmer
- SGLang
How to use hf-internal-testing/tiny-muse-glimmer 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-glimmer" \ --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-muse-glimmer", "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-muse-glimmer" \ --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-muse-glimmer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hf-internal-testing/tiny-muse-glimmer with Docker Model Runner:
docker model run hf.co/hf-internal-testing/tiny-muse-glimmer
| { | |
| "architectures": [ | |
| "MuseGlimmerForConditionalGeneration" | |
| ], | |
| "dtype": "float32", | |
| "image_token_id": 3, | |
| "model_type": "muse_glimmer", | |
| "out_hidden_size": 32, | |
| "output_attentions": true, | |
| "pad_token_id": 0, | |
| "projector_hidden_act": "gelu", | |
| "projector_hidden_size": 32, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "final_logit_softcapping": 20.0, | |
| "head_dim": 16, | |
| "hidden_activation": "silu", | |
| "hidden_size": 32, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 37, | |
| "layer_rope_theta": [ | |
| 10000.0, | |
| 0 | |
| ], | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention" | |
| ], | |
| "max_position_embeddings": 512, | |
| "model_type": "muse_glimmer_text", | |
| "num_attention_heads": 2, | |
| "num_hidden_layers": 2, | |
| "num_key_value_heads": 2, | |
| "output_attentions": true, | |
| "output_multiplier": 0.19611613513818404, | |
| "pad_token_id": 0, | |
| "post_norm_eps": 1e-08, | |
| "qk_scale_factor": 3.87, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": 2048, | |
| "tie_word_embeddings": false, | |
| "use_cache": true, | |
| "vocab_size": 99 | |
| }, | |
| "transformers_version": "5.16.0.dev0", | |
| "video_token_id": 4, | |
| "vision_config": { | |
| "dtype": "float32", | |
| "hidden_act": "gelu", | |
| "hidden_size": 32, | |
| "intermediate_size": 37, | |
| "layer_norm_eps": 1e-05, | |
| "layer_types": [ | |
| "window_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 512, | |
| "merge_size": 1, | |
| "model_type": "muse_glimmer_vision", | |
| "num_attention_heads": 2, | |
| "num_hidden_layers": 2, | |
| "output_attentions": true, | |
| "patch_size": 2, | |
| "patch_temporal": 2, | |
| "pos_emb_height": 4, | |
| "pos_emb_width": 4, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| } | |
| } | |
| } | |