Run this model with HF Jobs
Run trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration") 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("trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration") model = AutoModelForMultimodalLM.from_pretrained("trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration", 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 trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration", "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/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration
- SGLang
How to use trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration 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 "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration" \ --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": "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration", "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 "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration" \ --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": "trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration", "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 trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration with Docker Model Runner:
docker model run hf.co/trl-internal-testing/tiny-MuseGlimmerForConditionalGeneration
Upload MuseGlimmerForConditionalGeneration
#1
by albertvillanova HF Staff - opened
Files changed (3)
83 unmodified lines84858687888929 unmodified lines11912012112212312421 unmodified lines14614714814915015183 unmodified lines{%- set rs = reasoning_strength if reasoning_strength is defined and reasoning_strength else 'high' -%}{{- 'Reasoning strength: ' + rs + '.' -}}{%- endmacro -%}{%- macro render_system_meta(tools) -%}{%- set rns = namespace(recipients=['"self"'], nslist=[]) -%}{%- if tools -%}29 unmodified lines{%- endif -%}{{- '\n\n' -}}{{- render_reasoning() -}}{%- if tools -%}{{- '\n\n' -}}{{- render_tool_defs(tools) -}}21 unmodified lines{{- '\n\n' -}}{{- render_reasoning() -}}{%- endif -%}{%- if tools -%}{{- '\n\n' -}}{{- render_tool_defs(tools) -}}83 unmodified lines84858687888990919293949596979829 unmodified lines12812913013113213313421 unmodified lines15615715815916016116283 unmodified lines{%- set rs = reasoning_strength if reasoning_strength is defined and reasoning_strength else 'high' -%}{{- 'Reasoning strength: ' + rs + '.' -}}{%- endmacro -%}{%- macro render_response_format() -%}{#- The engine enforces response_format by sampling; the model never sees it. State it so themodel writes the answer the grammar expects. -#}{%- if response_format is defined and response_format -%}{%- if response_format.type == 'json_schema' -%}{{- '\n\nIn your final response to the user\'s latest message the output must adhere to the following json schema: ' + (response_format.json_schema.schema | tojson) -}}{%- endif -%}{%- endif -%}{%- endmacro -%}{%- macro render_system_meta(tools) -%}{%- set rns = namespace(recipients=['"self"'], nslist=[]) -%}{%- if tools -%}29 unmodified lines{%- endif -%}{{- '\n\n' -}}{{- render_reasoning() -}}{{- render_response_format() -}}{%- if tools -%}{{- '\n\n' -}}{{- render_tool_defs(tools) -}}21 unmodified lines{{- '\n\n' -}}{{- render_reasoning() -}}{%- endif -%}{{- render_response_format() -}}{%- if tools -%}{{- '\n\n' -}}{{- render_tool_defs(tools) -}}
59 unmodified lines6061626364656659 unmodified lines"max_position_embeddings": 1024,"merge_size": 2,"model_type": "muse_glimmer_vision","num_attention_heads": 4,"num_hidden_layers": 2,"patch_size": 14,"patch_temporal": 2,59 unmodified lines6061626364656659 unmodified lines"max_position_embeddings": 1024,"merge_size": 2,"model_type": "muse_glimmer_vision","num_attention_heads": 2,"num_hidden_layers": 2,"patch_size": 14,"patch_temporal": 2,
123version https://git-lfs.github.com/spec/v1oid sha256:c6da466985e3e11e3257bfc827f96979bf053067e8627671b7ac9063c40ce8cbsize 13040152123version https://git-lfs.github.com/spec/v1oid sha256:257890ca84b60bf46393f1b6b857ca8a0639a6a32195e8c7888d74074357b73fsize 13040152
chat_template.jinja+11
config.json+1-1
model.safetensors+1-1