Downloads · 30 days
3
8% of all-time downloads
Yooniel/gemma-3-27b-no-ai
gemma-3-27b-no-ai is a text generation model from Yooniel. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
LoRA adapter fine-tuned on top of google/gemma-3-27b-pt using supervised fine-tuning (SFT) on the allenai/dolci-instruct-sft instruction dataset.
Downloads · 30 days
3
8% of all-time downloads
All-time downloads
36
Public
Repo size
2 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 98%
From the Hugging Face model README
LoRA adapter fine-tuned on top of google/gemma-3-27b-pt using supervised
fine-tuning (SFT) on the allenai/dolci-instruct-sft instruction dataset.
| Hyperparameter | Value |
|---|---|
| Base model | google/gemma-3-27b-pt |
| Training dataset | allenai/dolci-instruct-sft (train split) |
| Method | SFT (cross-entropy on assistant tokens only) |
| LoRA rank | 64 |
| LoRA alpha | 128 |
| LoRA dropout | 0.0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, fc1, fc2, out_proj |
| Learning rate | 1e-5 |
| Optimizer | AdamW (β₁=0.9, β₂=0.999) |
| LR schedule | Linear warmup then linear decay |
| Warmup steps | min(50, total_steps // 10) |
| Epochs | 1 |
| Batch size | 1 |
| Gradient accumulation | 8 (effective batch size 8) |
| Max sequence length | 2048 |
| Precision | bfloat16 |
| Prompt format | Gemma <start_of_turn>user / <start_of_turn>model |
Prompts were truncated to 500 tokens and responses to 1500 tokens. Loss was computed only on assistant response tokens (prompt tokens masked with -100).
The following sample-level filters were applied during data preparation:
AI, language model, langauge model, artificial intelligencerole: environment or function_calls) were excludedfrom transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "google/gemma-3-27b-pt"
adapter_repo = "Yooniel/gemma-3-27b-no-ai"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_repo)
model.eval()
bos = tokenizer.bos_token or ""
prompt = bos + "<start_of_turn>user\n{question}<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer(prompt.format(question="Explain photosynthesis."),
return_tensors="pt").to(model.device)
end_of_turn_id = tokenizer.convert_tokens_to_ids("<end_of_turn>")
with torch.no_grad():
out = model.generate(
**inputs,
max_new_tokens=512,
do_sample=False,
eos_token_id=end_of_turn_id,
pad_token_id=tokenizer.eos_token_id,
)
new_tokens = out[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
<bos><start_of_turn>user
{your question}<end_of_turn>
<start_of_turn>model