How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="burtenshaw/GemmaCoder3-12B")
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)
# Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText

processor = AutoProcessor.from_pretrained("burtenshaw/GemmaCoder3-12B")
model = AutoModelForImageTextToText.from_pretrained("burtenshaw/GemmaCoder3-12B")
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=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Model Card for burtenshaw/GemmaCoder-3-12B

image/gif

This model is a fine-tuned version of google/gemma-3-12b-it on the open-r1/codeforces-cots dataset. It has been trained using TRL.

Evaluation

The model improves performance on the LiveCodeBench benchmark, but diminishes on other benchmarks.

Benchmark GemmaCoder-12B Gemma3-12B-it
Winogrande 63.9% 63.5%
MMLU 61.0% 69.5%
HellaSwag 54.0% 53.5%
LiveCodeBench 32.9% 21.9%

Quick start

from transformers import pipeline

question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="burtenshaw/gemma-3-12b-it-codeforces-SFT", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training procedure

Visualize in Weights & Biases

This model was trained with SFT.

Framework versions

  • TRL: 0.17.0.dev0
  • Transformers: 4.51.0.dev0
  • Pytorch: 2.6.0
  • Datasets: 3.4.1
  • Tokenizers: 0.21.1

Citations

Cite TRL as:

@misc{vonwerra2022trl,
    title        = {{TRL: Transformer Reinforcement Learning}},
    author       = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
    year         = 2020,
    journal      = {GitHub repository},
    publisher    = {GitHub},
    howpublished = {\url{https://github.com/huggingface/trl}}
}
Downloads last month
57
Safetensors
Model size
12B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with burtenshaw/GemmaCoder3-12B.

Model tree for burtenshaw/GemmaCoder3-12B

Finetuned
(355)
this model
Quantizations
8 models

Dataset used to train burtenshaw/GemmaCoder3-12B

Collection including burtenshaw/GemmaCoder3-12B

Article mentioning burtenshaw/GemmaCoder3-12B