RustMentor 1B Mobile β LiteRT
A 1B-parameter Gemma3-based model fine-tuned for Rust programming education, packaged as .litertlm for Google AI Edge Gallery on Android.
Full GPU delegation on Pixel 8 Pro (Tensor G3 / Mali-G715).
For the LoRA adapter, see rust-mentor-1b-mobile.
Model Description
- Base Model: google/gemma-3-1b-it
- Parameters: 1B
- Format: .litertlm (LiteRT bundle: .tflite + tokenizer + metadata)
- Quantization: Dynamic INT8
- Context Length: 2048 tokens
- Stop Tokens:
<eos>(1),<end_of_turn>(106) - License: Gemma
How to Use
Google AI Edge Gallery (Android)
- Install Google AI Edge Gallery
- Download the
.litertlmfile from this repo - Transfer to your device:
adb push *.litertlm /sdcard/Download/ - Open Gallery app, tap "+", select the file
- Chat offline with GPU acceleration
LiteRT-LM (Kotlin)
val options = LlmInferenceOptions.builder()
.setModelPath("/path/to/rust_mentor_1b_mobile.litertlm")
.setMaxTokens(512)
.build()
val llm = LlmInference.createFromOptions(context, options)
val response = llm.generateResponse("Explain Rust ownership to a Go developer")
What It Does
- Explains Rust ownership, borrowing, and lifetimes with Go/Python/TS comparisons
- Code review with borrow checker explanations
- Error handling patterns (Result, Option, ?, thiserror, anyhow)
- Async/await, smart pointers, pattern matching, traits
- CLI tooling with clap, Cargo project structure
Training Data
- Strandset-Rust-v1: 3,000 samples of Rust code tasks
- Synthetic tutor conversations: 46 hand-crafted dialogues across 28 topics
- Style: Draws parallels to Go/Python/TypeScript
Training Configuration
| Parameter | Value |
|---|---|
| Base Model | google/gemma-3-1b-it |
| Method | QLoRA via Unsloth |
| LoRA Rank | 16 |
| Epochs | 3 |
| Effective Batch Size | 8 |
| Learning Rate | 2e-4 (cosine) |
Export Configuration
| Parameter | Value |
|---|---|
| Converter | litert-torch (Gemma3 built-in) |
| Quantization | Dynamic INT8 |
| KV Cache | 2048 |
| Format | .litertlm |
| GPU Delegation | Full on Tensor G3 |
Safety & Limitations
- May generate incorrect code β always compile and test
- Optimized for tutoring, not production code generation
- Training data focuses on CLI/systems patterns
License
Gemma license β free for commercial use. See Gemma Terms.
Contact
- Maintainer: Sylvester Francis
- Repository: github.com/sylvester-francis/slm-rust-model
- Downloads last month
- 12