Text Generation
PEFT
Safetensors
age-verification
explanation
lora
qlora
multilingual
africa
conversational
Instructions to use Shinzmann/gemma-explain-lora-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Shinzmann/gemma-explain-lora-v0 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it") model = PeftModel.from_pretrained(base_model, "Shinzmann/gemma-explain-lora-v0") - Notebooks
- Google Colab
- Kaggle
Add W&B training curves to model card
Browse files
README.md
CHANGED
|
@@ -34,7 +34,9 @@ Synthesized from the Kámárí policy engine, not from child faces: sampled sign
|
|
| 34 |
reason-code balanced (so it is not dominated by ALLOW): 8,000 rows, 7,200 train / 800 eval.
|
| 35 |
|
| 36 |
## Evaluation
|
| 37 |
-
Training loss converged from 3.00 to
|
|
|
|
|
|
|
| 38 |
endpoint** (the manual KV-cached greedy decode used in production, not the buggy `generate()` path),
|
| 39 |
over **n=70** cases across 5 reason codes and 7 languages (en, sw, yo, ha, am, fr, ar):
|
| 40 |
|
|
@@ -53,6 +55,13 @@ in-language generation by the model. (An earlier v0 eval showed 0.0 across the b
|
|
| 53 |
through the buggy `generate()` path; those numbers are superseded.) Non-English strings still benefit
|
| 54 |
from a native review.
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## Serving
|
| 57 |
Load base Gemma 4 + this adapter, `merge_and_unload()`, and decode greedily token by token (avoid
|
| 58 |
`generate()`). On any validation failure, return a deterministic safe fallback so the caller always
|
|
|
|
| 34 |
reason-code balanced (so it is not dominated by ALLOW): 8,000 rows, 7,200 train / 800 eval.
|
| 35 |
|
| 36 |
## Evaluation
|
| 37 |
+
Training loss converged from 3.00 to a best eval loss of 0.087, at 96.3% eval token accuracy
|
| 38 |
+
(3 epochs / 675 steps, about 35 minutes on an H200; tracked in Weights & Biases, project `kamari`).
|
| 39 |
+
Evaluated through the **served
|
| 40 |
endpoint** (the manual KV-cached greedy decode used in production, not the buggy `generate()` path),
|
| 41 |
over **n=70** cases across 5 reason codes and 7 languages (en, sw, yo, ha, am, fr, ar):
|
| 42 |
|
|
|
|
| 55 |
through the buggy `generate()` path; those numbers are superseded.) Non-English strings still benefit
|
| 56 |
from a native review.
|
| 57 |
|
| 58 |
+
## Training curves
|
| 59 |
+
Pulled from the Weights & Biases run (project `kamari`, run `gemma4b-lora-r32`). Cross-entropy loss
|
| 60 |
+
converges from 3.00 to a best eval loss of 0.087, and mean token accuracy rises to 96.3%, with train
|
| 61 |
+
and eval tracking closely across 675 steps (3 epochs).
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
|
| 65 |
## Serving
|
| 66 |
Load base Gemma 4 + this adapter, `merge_and_unload()`, and decode greedily token by token (avoid
|
| 67 |
`generate()`). On any validation failure, return a deterministic safe fallback so the caller always
|