Instructions to use myyycroft/Gemma-4-E2B-AmbigQA-full-member-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use myyycroft/Gemma-4-E2B-AmbigQA-full-member-4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="myyycroft/Gemma-4-E2B-AmbigQA-full-member-4") 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("myyycroft/Gemma-4-E2B-AmbigQA-full-member-4") model = AutoModelForMultimodalLM.from_pretrained("myyycroft/Gemma-4-E2B-AmbigQA-full-member-4", 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 myyycroft/Gemma-4-E2B-AmbigQA-full-member-4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/myyycroft/Gemma-4-E2B-AmbigQA-full-member-4
- SGLang
How to use myyycroft/Gemma-4-E2B-AmbigQA-full-member-4 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 "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4" \ --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": "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4" \ --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": "myyycroft/Gemma-4-E2B-AmbigQA-full-member-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use myyycroft/Gemma-4-E2B-AmbigQA-full-member-4 with Docker Model Runner:
docker model run hf.co/myyycroft/Gemma-4-E2B-AmbigQA-full-member-4
myyycroft/Gemma-4-E2B-AmbigQA-full-member-4
Ensemble member 4 (seed 4078) from run gemma4_e2b_full_small_lr.
Fine-tuned from google/gemma-4-E2B-it on AmbigQA.
Evaluation note
Metrics below are computed on small fixed subsets, not full benchmarks.
Exact subset sizes: AmbigQA (128), IFEval (64), MMLU (228).
Reported values are from the final training step (step=1620, epoch=3).
Dataset
- Hub dataset:
sewon/ambig_qa(config_name=light) - Revision:
6e667596df70f17ba3c8e7be4b7361f6be8b60f8 - Splits: train=
train, validation=validation - Dev holdout:
dev_fraction=0.1,split_seed=1729 - Bootstrap resampling:
False
System prompt
No system prompt (dataset.system_prompt: null).
Hyperparameters
Exact resolved settings used for this run (also attached as resolved_config.yaml):
model:
name: google/gemma-4-E2B-it
revision: main
dtype: bfloat16
enable_thinking: false
dataset:
name: sewon/ambig_qa
config_name: light
revision: 6e667596df70f17ba3c8e7be4b7361f6be8b60f8
train_split: train
validation_split: validation
dev_fraction: 0.1
split_seed: 1729
bootstrap: false
max_train_examples: null
max_dev_examples: null
system_prompt_set: false
adaptation:
method: full
training:
num_train_epochs: 3.0
max_steps: -1
learning_rate: 2.0e-05
weight_decay: 0.1
warmup_ratio: 0.03
per_device_train_batch_size: 4
per_device_eval_batch_size: 16
gradient_accumulation_steps: 8
max_seq_length: 512
logging_steps: 10
save_every_steps: null
save_total_limit: null
gradient_checkpointing: true
bf16: true
tf32: true
max_grad_norm: 1.0
dataloader_num_workers: 2
adam_beta1: 0.9
adam_beta2: 0.999
adam_epsilon: 1.0e-08
ensemble:
size: 5
base_seed: 42
this_member_index: 4
this_member_seed: 4078
evaluation_subsets:
ambigqa:
subset_size: 128
seed: 1001
ifeval:
subset_size: 64
seed: 1002
mmlu:
subset_size: 228
seed: 1004
Metrics breakdown
The metrics in this section use small fixed subsets, not full benchmarks: AmbigQA (128), IFEval (64), MMLU (228).
Final-step ensemble mean ± std (n=5)
- AmbigQA (128) accuracy: 0.0922 ± 0.0116
- AmbigQA (128) AlignScore: 0.1887 ± 0.0125
- IFEval (64) prompt_level_strict_accuracy: 0.6250 ± 0.0442
- MMLU (228) accuracy: 0.5596 ± 0.0200
- train_loss: 1.5896 ± 0.0063
- steps: 1620
- epochs: 3
Per-member (final step)
| member | seed | steps | epochs | train_loss | AmbigQA (128) acc | AmbigQA (128) AlignScore | IFEval (64) strict | MMLU (228) acc |
|---|---|---|---|---|---|---|---|---|
| 0 | 42 | 1620 | 3 | 1.5835 | 0.0781 | 0.1918 | 0.6719 | 0.5526 |
| 1 | 1051 | 1620 | 3 | 1.5954 | 0.0859 | 0.1729 | 0.5781 | 0.5526 |
| 2 | 2060 | 1620 | 3 | 1.5892 | 0.0938 | 0.1924 | 0.6719 | 0.5702 |
| 3 | 3069 | 1620 | 3 | 1.5833 | 0.1094 | 0.1805 | 0.6094 | 0.5877 |
| 4 (this repo) | 4078 | 1620 | 3 | 1.5964 | 0.0938 | 0.2057 | 0.5938 | 0.5351 |
Files
- Model weights / adapter files from
members/member_004/final/ resolved_config.yaml— full resolved training configensemble_metrics.png— train/eval curves for the whole ensemblerun_artifacts/— ensemble-level manifests, status, and captured environmentrun_artifacts/members/member_004/— this member's manifests, metadata, and statusrun_artifacts/members/member_004/predictions/— per-dataset JSONL predictions from every intermediate evaluation step
- Downloads last month
- 14