Image-Text-to-Text
Transformers
Safetensors
English
gemma3n
text-generation-inference
unsloth
medical
vision-language
gemma
ecg
cardiology
healthcare
conversational
Run this model with HF Jobs
Run yasserrmd/GemmaECG-Vision 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/yasserrmd/GemmaECG-Vision. 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/yasserrmd/GemmaECG-Vision 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/yasserrmd/GemmaECG-Vision. 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/yasserrmd/GemmaECG-Vision. 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 yasserrmd/GemmaECG-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yasserrmd/GemmaECG-Vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="yasserrmd/GemmaECG-Vision") 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("yasserrmd/GemmaECG-Vision") model = AutoModelForMultimodalLM.from_pretrained("yasserrmd/GemmaECG-Vision", 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 yasserrmd/GemmaECG-Vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yasserrmd/GemmaECG-Vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yasserrmd/GemmaECG-Vision", "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/yasserrmd/GemmaECG-Vision
- SGLang
How to use yasserrmd/GemmaECG-Vision 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 "yasserrmd/GemmaECG-Vision" \ --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": "yasserrmd/GemmaECG-Vision", "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 "yasserrmd/GemmaECG-Vision" \ --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": "yasserrmd/GemmaECG-Vision", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use yasserrmd/GemmaECG-Vision with Docker Model Runner:
docker model run hf.co/yasserrmd/GemmaECG-Vision
(Trained with Unsloth)
Browse filesFiles changed (10)
- .gitattributes+1
- chat_template.jinjaAdded+49
- config.jsonAdded+209
- generation_config.jsonAdded+13
- preprocessor_config.jsonAdded+51
- processor_config.jsonAdded+5
- special_tokens_map.jsonAdded+36
- tokenizer.jsonAdded+3
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{{ bos_token }}{%- if messages[0]['role'] == 'system' -%} {%- if messages[0]['content'] is string -%} {%- set first_user_prefix = messages[0]['content'] + '
' -%} {%- else -%} {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
' -%} {%- endif -%} {%- set loop_messages = messages[1:] -%}{%- else -%} {%- set first_user_prefix = "" -%} {%- set loop_messages = messages -%}{%- endif -%}{%- for message in loop_messages -%} {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%} {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }} {%- endif -%} {%- if (message['role'] == 'assistant') -%} {%- set role = "model" -%} {%- else -%} {%- set role = message['role'] -%} {%- endif -%} {{ '<start_of_turn>' + role + '' + (first_user_prefix if loop.first else "") }} {%- if message['content'] is string -%} {{ message['content'] | trim }} {%- elif message['content'] is iterable -%} {%- for item in message['content'] -%} {%- if item['type'] == 'audio' -%} {{ '<audio_soft_token>' }} {%- elif item['type'] == 'image' -%} {{ '<image_soft_token>' }} {%- elif item['type'] == 'text' -%} {{ item['text'] | trim }} {%- endif -%} {%- endfor -%} {%- else -%} {{ raise_exception("Invalid content type") }} {%- endif -%} {{ '<end_of_turn>' }}{%- endfor -%}{%- if add_generation_prompt -%} {{'<start_of_turn>model'}}{%- endif -%}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209{ "architectures": [ "Gemma3nForConditionalGeneration" ], "audio_config": { "conf_attention_chunk_size": 12, "conf_attention_context_left": 13, "conf_attention_context_right": 0, "conf_attention_logit_cap": 50.0, "conf_conv_kernel_size": 5, "conf_num_attention_heads": 8, "conf_num_hidden_layers": 12, "conf_reduction_factor": 4, "conf_residual_weight": 0.5, "gradient_clipping": 10000000000.0, "hidden_size": 1536, "input_feat_size": 128, "model_type": "gemma3n_audio", "rms_norm_eps": 1e-06, "sscp_conv_channel_size": [ 128, 32 ], "sscp_conv_group_norm_eps": 0.001, "sscp_conv_kernel_size": [ [ 3, 3 ], [ 3, 3 ] ], "sscp_conv_stride_size": [ [ 2, 2 ], [ 2, 2 ] ], "torch_dtype": "bfloat16", "vocab_offset": 262272, "vocab_size": 128 }, "audio_soft_tokens_per_image": 188, "audio_token_id": 262273, "boa_token_id": 256000, "boi_token_id": 255999, "bos_token_id": 2, "eoa_token_id": 262272, "eoi_token_id": 262144, "eos_token_id": 106, "image_token_id": 262145, "initializer_range": 0.02, "model_type": "gemma3n", "pad_token_id": 0, "text_config": { "activation_sparsity_pattern": [ 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], "altup_active_idx": 0, "altup_coef_clip": 120.0, "altup_correct_scale": true, "altup_num_inputs": 4, "attention_bias": false, "attention_dropout": 0.0, "final_logit_softcapping": 30.0, "head_dim": 256, "hidden_activation": "gelu_pytorch_tanh", "hidden_size": 2048, "hidden_size_per_layer_input": 256, "initializer_range": 0.02, "intermediate_size": [ 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192 ], "laurel_rank": 64, "layer_types": [ "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention" ], "max_position_embeddings": 32768, "model_type": "gemma3n_text", "num_attention_heads": 8, "num_hidden_layers": 30, "num_key_value_heads": 2, "num_kv_shared_layers": 10, "rms_norm_eps": 1e-06, "rope_local_base_freq": 10000.0, "rope_scaling": null, "rope_theta": 1000000.0, "sliding_window": 512, "torch_dtype": "bfloat16", "use_cache": true, "vocab_size": 262400, "vocab_size_per_layer_input": 262144 }, "torch_dtype": "bfloat16", "transformers_version": "4.54.1", "unsloth_fixed": true, "unsloth_version": "2025.8.1", "vision_config": { "architecture": "mobilenetv5_300m_enc", "do_pooling": false, "hidden_size": 2048, "initializer_range": 0.02, "label_names": [ "LABEL_0", "LABEL_1" ], "model_args": null, "model_type": "gemma3n_vision", "num_classes": 2, "rms_norm_eps": 1e-06, "torch_dtype": "bfloat16", "vocab_offset": 262144, "vocab_size": 128 }, "vision_soft_tokens_per_image": 256}12345678910111213{ "bos_token_id": 2, "cache_implementation": "hybrid", "do_sample": true, "eos_token_id": [ 1, 106 ], "pad_token_id": 0, "top_k": 64, "top_p": 0.95, "transformers_version": "4.54.1"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{ "crop_size": null, "data_format": "channels_first", "default_to_square": false, "device": null, "disable_grouping": null, "dither": 0.0, "do_center_crop": null, "do_convert_rgb": null, "do_normalize": false, "do_rescale": true, "do_resize": true, "feature_size": 128, "fft_length": 1024, "fft_overdrive": true, "frame_length": 512, "hop_length": 160, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "SiglipImageProcessorFast", "image_seq_length": 256, "image_std": [ 0.5, 0.5, 0.5 ], "input_data_format": null, "input_scale_factor": 1.0, "max_frequency": 7600.0, "mel_floor": 1e-05, "min_frequency": 125.0, "padding_side": "right", "padding_value": 0.0, "per_bin_mean": null, "per_bin_stddev": null, "preemphasis": 0.97, "preemphasis_htk_flavor": true, "processor_class": "Gemma3nProcessor", "resample": 2, "rescale_factor": 0.00392156862745098, "return_attention_mask": true, "return_tensors": null, "sampling_rate": 16000, "size": { "height": 768, "width": 768 }}12345{ "audio_seq_length": 188, "image_seq_length": 256, "processor_class": "Gemma3nProcessor"}123456789101112131415161718192021222324252627282930313233343536{ "audio_token": "<audio_soft_token>", "boa_token": "<start_of_audio>", "boi_token": "<start_of_image>", "bos_token": { "content": "<bos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eoa_token": "<end_of_audio>", "eoi_token": "<end_of_image>", "eos_token": { "content": "<end_of_turn>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "image_token": "<image_soft_token>", "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:b6c35ee648c07754b44cd9e371c75d4caa05c4504910b7ad29b1847ee9d8ba5dsize 33442553123version https://git-lfs.github.com/spec/v1oid sha256:ea5f0cc48abfbfc04d14562270a32e02149a3e7035f368cc5a462786f4a59961size 4696020.gitattributes+1
chat_template.jinjaAdded+49
config.jsonAdded+209
generation_config.jsonAdded+13
preprocessor_config.jsonAdded+51
processor_config.jsonAdded+5
special_tokens_map.jsonAdded+36
tokenizer.jsonAdded+3
tokenizer.modelAdded+3
tokenizer_config.jsonAdded