Instructions to use SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b") 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("SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b") model = AutoModelForMultimodalLM.from_pretrained("SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b", 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 SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b", "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/SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b
- SGLang
How to use SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b 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 "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b" \ --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": "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b", "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 "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b" \ --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": "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b", "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 SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b with Docker Model Runner:
docker model run hf.co/SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b
Team Rexx: Gemma 4 E4B fine-tuned for SinhalaMMLU
This is the model behind Team Rexx's SinhalaMMLU shared-task submissions: the final greedy submission (Codabench ID 145, macro average 67.5666) and the earlier sampled submission 08 (ID 104, macro average 64.6025). It is loaded by SinhalaMMLU-SharedTask/team-rexx's inference.py; that repo's README covers how to run it, the training data and the closed-model disclosure.
- Base model: google/gemma-4-E4B-it
- Method: LoRA reasoning distillation on 20,870 correct teacher traces (rank 64, 2 epochs, learning rate 5e-5), merged into the weights, then
W = W_base + 0.5 (W_distilled β W_base) - Parameters: 7,941,100,832, the full merged BF16 checkpoint. No adapter or base download is needed.
- Files: identical to
sinhala-mmlu/gemma-4-e4b-sinhala-mmluat tagv2.0.0, our public release with the full model card, benchmark results and licence notes.SHA256SUMSis that release's checksum list; every file here except thisREADME.mdmatches it. - Licence: Apache 2.0, following the Gemma 4 licence. See
LICENSE,NOTICEandMODIFICATIONS.md.
Use
The recipe is in inference.py of the team repo: thinking on, a subject and grade line, 8 greedy answers over shuffled options with a majority vote, and a 7,168-token thinking budget, with vLLM 0.32.0 on one A100 40 GB. A minimal Transformers load:
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "SinhalaMMLU-SharedTask/team-rexx-gemma-4-e4b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto").eval()
- Downloads last month
- 22