Downloads · 30 days
11
23% of all-time downloads
broadfield-dev/gemma-3-270m-context-qa
gemma-3-270m-context-qa is a machine learning model from broadfield-dev. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model is a fine-tuned version of broadfield-dev/gemma-3-270m-tuned-0105-1022-tuned-0105-1045-tuned-0105-1111-tuned-0105-1133 on the broadfield-dev/deepmindnarrativeqa-Broadfield dataset.
Downloads · 30 days
11
23% of all-time downloads
All-time downloads
47
Public
Parameters
268M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 97%
From the Hugging Face model README
This model is a fine-tuned version of broadfield-dev/gemma-3-270m-tuned-0105-1022-tuned-0105-1045-tuned-0105-1111-tuned-0105-1133 on the broadfield-dev/deepmind_narrativeqa-Broadfield dataset.
['LABEL_0', 'LABEL_1']
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "broadfield-dev/gemma-3-270m-context-qa"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16)
messages = [
{"role": "system", "content": "Using the context, answer the users question."},
{"role": "user", "content": "Context: {context_content}\n\nQuestion: Your input here..."}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))