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)

  1. Install Google AI Edge Gallery
  2. Download the .litertlm file from this repo
  3. Transfer to your device: adb push *.litertlm /sdcard/Download/
  4. Open Gallery app, tap "+", select the file
  5. 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

Downloads last month
12
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for sylvester-francis/rust-mentor-1b-mobile-LiteRT

Finetuned
(509)
this model

Dataset used to train sylvester-francis/rust-mentor-1b-mobile-LiteRT