Skip to content
ModelListedExternal
Browse files

Gemma 3 270m Python

This model is a fine-tuned version of google/gemma-3-270m-it. It has been trained using TRL.

KindOtherBase modelgoogle/gemma-3-270m-itVersionRevision 2fbc31eCgrade

Model source

Kind
Other
File size
7.27 MB
Base model
google/gemma-3-270m-it
Version
vRevision 2fbc31e
Updated
Oct 27, 2026
Downloads
6
Source
Hugging Face

Source description

Model Card for gemma-python-lora

This model is a fine-tuned version of google/gemma-3-270m-it. It has been trained using TRL.

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="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training procedure

This model was trained with SFT.

Framework versions

  • PEFT 0.19.1
  • TRL: 1.8.0
  • Transformers: 5.14.1
  • Pytorch: 2.11.0+cu128
  • Datasets: 5.0.0
  • Tokenizers: 0.22.2

Citations

Cite TRL as:

@software{vonwerra2020trl,
  title   = {{TRL: Transformers Reinforcement Learning}},
  author  = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
  license = {Apache-2.0},
  url     = {https://github.com/huggingface/trl},
  year    = {2020}
}

Sources

1 source
Hugging FacePrimaryVersion 2fbc31e0ee74f1db9bdf84c2249d0ba95fdbe38e
huggingface.co/Rev2auth/gemma-3-270m-python/tree/2fbc31e0ee74f1db9bdf84c2249d0ba95fdbe38e

Verified Oct 27

Download files

Model artifacts

4 artifacts

adapter_model.safetensors

safetensors · 7.27 MB · SHA-256 448413c8f62f…7e25 · Hugging Face

Download file

checkpoint-200/adapter_model.safetensors

safetensors · 7.27 MB · SHA-256 b10b560d7cf8…decc · Hugging Face

Download file

checkpoint-400/adapter_model.safetensors

safetensors · 7.27 MB · SHA-256 7fcdabcd22eb…c3ec · Hugging Face

Download file

checkpoint-775/adapter_model.safetensors

safetensors · 7.27 MB · SHA-256 448413c8f62f…7e25 · Hugging Face

Download file

Source excerpts

3 excerpts

--- base_model: google/gemma-3-270m-it library_name: peft model_name: gemma-python-lora tags: - base_model:adapter:google/gemma-3-270m-it - lora - sft - transformers - trl licence: license pipeline_tag: text-generation --- # Model Card for gemma-python-lora This model is a fine-tuned version of [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it). It has been trained using [TRL](https://github.com/huggingface/trl). ## Quick start ```python 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="None", device="cuda") output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] print(output["generated_text"]) ``` ## Training procedure This model was trained with SFT. ### Framework versions - PEFT 0.19.1 - TRL: 1.8.0 - Transformers: 5.14.1 - Pytorch: 2.11.0+cu128 - Datasets: 5.0.0 - Tokenizers: 0.22.2 ## Citations Cite TRL as: ```bibtex @software{vonwerra2020trl, title = {{TRL: Transformers Reinforcement Learning}}, author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin}, license = {Apache-2.0}, url = {https://github.com/huggingface/trl}, year = {2020} } ```

Source context: 6 downloads · 0 likes · Pipeline text-generation · Library peft · Repo Rev2auth/gemma-3-270m-python

Source context: 36 downloads · 0 likes · Pipeline text-generation · Library peft · Repo Rev2auth/gemma-3-270m-python