CoolFace
Modelpublic

MindFreakGamer/gemma-4-E2B-pocket-mechanic-GGUF

sourceHugging Facegemmaupdated 3mo agoView on Hugging Face
2likes208downloads
Model Card

๐Ÿ”ง Pocket Mechanic: Gemma 4 E2B fine-tune (GGUF)

A mechanic in your pocket who can't be gaslit.

A 2B-parameter language model that reads OBD-II sensor data, names the likely fault, gives the cheapest plausible fix (with parts cost + DIY time), and flags the specific upsell traps mechanics attach to that fault.

Submission to the Hugging Face [Build Small Hackathon](https://huggingface.co/spaces/build-small-hackathon), Backyard AI track (June 2026).

Try the live demo: [Space](https://huggingface.co/spaces/MindFreakGamer/pocket-mechanic) ยท Read the architecture: [GitHub](https://github.com/small-hack-huggingface/obd-intelligence)


Headline benchmark

Blind Claude Opus 4.7 judge, n=100 held-out cases. Answers were presented in randomized A/B order without model names:

AxisQ8_0 studentOpus 4.7 teacherRatio
Faithfulness to sensor data7.149.0479.0%
Helpfulness7.419.0781.7%
Cost accuracy7.138.7881.2%
Anti-ripoff value7.599.1383.1%
Overall7.329.0181.3%

The 3.2 GB Q4KM phone-target variant scores 75.3% on the same benchmark.

Per-call cost: $0 on-device vs ~$0.07 for the teacher via API.


Files

FileSizeRecommended for
pocket-mechanic-q8_0.gguf4.6 GBLaptops, desktops, GPU Spaces. The benchmarked 81.3% config.
pocket-mechanic-q4_k_m.gguf3.2 GBFlagship phones via llama.rn / llama_cpp_dart. 75.3%.

How to use

bash
pip install llama-cpp-python huggingface_hub
python
from huggingface_hub import hf_hub_download
from llama_cpp import Llama

gguf = hf_hub_download(
    "MindFreakGamer/gemma-4-E2B-pocket-mechanic-GGUF",
    "pocket-mechanic-q8_0.gguf",
)
llm = Llama(model_path=gguf, n_ctx=4096, n_gpu_layers=-1, verbose=False)

SYSTEM = (
    "You are Pocket Mechanic, a trusted mechanic in the driver's pocket. You read "
    "OBD-II sensor data and explain car problems in plain English. Always answer in "
    "this structure: 1. WHAT'S HAPPENING  2. ROOT CAUSE  3. WHAT TO DO (cheapest "
    "fix first, with cost and time)  4. WATCH OUT FOR (mechanic upsell traps). Be "
    "honest, specific, and protect the driver's wallet."
)

USER = """VEHICLE: 2014 Toyota Camry, 2.5L I4, 128,000 mi
DRIVE WINDOW: last 2.5 min, context: city

SENSOR SUMMARY (full window):
coolant_temp_c           mean=103.21  std=4.62  slope/min=+6.40  min=92  max=116
... (full PID summary)

ACTIVE DTCs: P0217
PREDICTOR OUTPUT: overheating: 99%, cooling_fan_failure: 1%

DRIVER ASKS: What do I do, the temp gauge is climbing!"""

for chunk in llm.create_chat_completion(
    [{"role": "system", "content": SYSTEM},
     {"role": "user",   "content": USER}],
    max_tokens=700, temperature=0.2, top_p=0.9, stream=True,
):
    print(chunk["choices"][0]["delta"].get("content", ""), end="", flush=True)
Tip for reproducing the 81.3% benchmark: the headline result includes a per-fault repair-economics "reference card" injected into the prompt at inference time (cost ranges, common shop upsells per fault, sourced from the distillation system prompt). Without that injection the same model scores ~70%. See promptlib.py in the code repo for the full card.

Training

DetailValue
Base model`google/gemma-4-E2B-it`
MethodLoRA (r=16, ฮฑ=32, dropout 0.05, 7 target modules)
FrameworkUnsloth + TRL SFTTrainer + train_on_responses_only
Data`MindFreakGamer/pocket-mechanic-distilled`: 4,365 explanations distilled from Claude Opus 4.7 via the Anthropic Batch API
Hardware1ร— NVIDIA A10G on Hugging Face Jobs
Wall time2h 42m for 2 epochs
Losseval 3.73 โ†’ 2.31

Quantized to GGUF (Q4KM, Q8_0) via llama.cpp after merging the LoRA into fp16. The fp16 merged weights live at `MindFreakGamer/gemma-4-E2B-pocket-mechanic`; the raw LoRA adapter at `MindFreakGamer/gemma-4-E2B-pocket-mechanic-lora`.


Limitations

  • โ€”Benchmark uses synthetic faults with clean signatures. Real-world accuracy will be lower, and per-vehicle baselines matter. The architecture (predictor reasoning over deltas from a per-car baseline) is designed for that, but it has not been validated on 22 actually-broken cars.
  • โ€”Repair-cost estimates are US-typical 4-cylinder sedan economics. Not calibrated for other regions, trucks, EVs, or luxury makes.
  • โ€”The benchmark judge is the same model family as the teacher, so there is a self-preference risk. Blind randomized A/B presentation mitigates but does not eliminate it.
  • โ€”This is a diagnostic aid, not a substitute for a licensed mechanic. Always pull over and stop driving for any flashing check-engine light or climbing coolant temperature regardless of what the model says.

License

Inherits the Gemma license from google/gemma-4-E2B-it.

The training data is dataset-licensed separately (CC BY-NC 4.0); see the dataset card.


Citation

bibtex
@misc{pocket-mechanic-2026,
  title  = {Pocket Mechanic: Gemma 4 E2B fine-tuned for offline OBD-II diagnosis},
  author = {Abenanth Gurunathan},
  year   = {2026},
  url    = {https://github.com/small-hack-huggingface/obd-intelligence},
  note   = {Hugging Face Build Small Hackathon, Backyard AI track}
}