Views
No views yet
A compact, reasoning-capable assistant trained on 114K high-quality synthetic examples covering math, science, code, and logic puzzles.
gemma-3-270m-it, trained on the OpenThoughts-114k dataset — a high-quality synthetic reasoning dataset with 114,000 examples spanning math, coding, science, and puzzles.Q8_0, BF16) and continued training via LoRA| Attribute | Value |
|---|---|
| Base Model | unsloth/gemma-3-270m-it |
| Dataset | open-thoughts/OpenThoughts-114k |
| Training Method | LoRA (rank=64) + Unsloth-optimized SFT |
| Context Length | 2048 tokens |
| Hardware Used | Google Colab T4 (16GB VRAM) |
| Training Steps | 300 steps (~30 minutes) |
| Final Loss | ~2.81 |
| Trainable Params | 15.2M (5.36% of total) |
| License | LGPL-3.0 |
🔍 The dataset uses a structured "Thought → Solution" format, teaching the model to reason step-by-step before answering — ideal for complex tasks.
1# Create Modelfile
2echo 'FROM ./gemma-3-270m-openthoughts.Q8_0.gguf
3TEMPLATE "{{ if .Prompt }}<start_of_turn>user\n{{ .Prompt }}<end_of_turn>\n<start_of_turn>model\n{{ end }}"
4PARAMETER temperature 0.8
5PARAMETER top_p 0.95
6PARAMETER top_k 64' > Modelfile
7
8# Build and run
9ollama create my-gemma -f Modelfile
10ollama run my-gemmallama.cpp./main -m gemma-3-270m-openthoughts.Q8_0.gguf -p "Explain backpropagation like I'm 12." -n 1501from unsloth import FastModel
2model, tokenizer = FastModel.from_pretrained("your-hf-username/gemma-3-270m-openthoughts")
3# Use for inference or continued training| File | Format | Use Case |
|---|---|---|
gemma-3-270m-openthoughts.Q8_0.gguf | 8-bit quantized | Best for llama.cpp, Ollama, LM Studio |
gemma-3-270m-openthoughts.BF16.gguf | Full precision | Highest quality, larger size |
adapter_model.safetensors | LoRA adapter | For continued training or merging |
💡 Recommendation: UseQ8_0for most local applications (~500 MB). UseBF16only if you need maximum fidelity.
teknium/OpenHermes-2.5) using the LoRA checkpoint:1from unsloth import FastModel
2model, tokenizer = FastModel.from_pretrained(
3 model_name = "your-hf-username/gemma-3-270m-openthoughts", # LoRA folder
4 max_seq_length = 2048,
5 load_in_4bit = True,
6)
7# Add new data and train!📄 Read the OpenThoughts paper for full methodology.
1from unsloth import FastModel
2from datasets import load_dataset
3
4# Load model
5model, tokenizer = FastModel.from_pretrained(
6 "unsloth/gemma-3-270m-it",
7 load_in_4bit=True,
8 max_seq_length=2048,
9)
10
11# Apply LoRA
12model = FastModel.get_peft_model(model, r=64)
13
14# Load & format OpenThoughts
15dataset = load_dataset("open-thoughts/OpenThoughts-114k", split="train[:50000]")
16# (system + conversations → user/assistant only for Gemma-3)
17
18# Train
19trainer = SFTTrainer(..., max_steps=300, per_device_train_batch_size=4)
20trainer.train()
21
22# Export to GGUF
23model.save_pretrained_gguf("gemma-3-270m-openthoughts", tokenizer, quantization_method="Q8_0")⚠️ Commercial use: Review Gemma’s terms before deployment.