Downloads · 30 days
5
10% of all-time downloads
sylvester-francis/rust-mentor-1.7b-LiteRT
rust-mentor-1.7b-LiteRT is a text generation model from sylvester-francis. Use it when you need the model to write or continue text. It is set up for litert. The card lists the license as apache-2.0.
RustMentor-1.7B-LiteRT is a 1.7B-parameter Qwen3-based model fine-tuned for Rust programming education and code review. This repository hosts the LiteRT (.tflite) format for on-device Android inference with GPU/NPU ac…
Downloads · 30 days
5
10% of all-time downloads
All-time downloads
52
Public
Repo size
11.8 GB
Likes
1
Public
Click a slice to open those files.
.safetensors4.1 GB · 53%
From the Hugging Face model README
RustMentor-1.7B-LiteRT is a 1.7B-parameter Qwen3-based model fine-tuned for Rust programming education and code review. This repository hosts the LiteRT (.tflite) format for on-device Android inference with GPU/NPU acceleration.
For the LoRA adapter, see rust-mentor-1.7b. For GGUF (llama.cpp/Ollama), see rust-mentor-1.7b-GGUF.
LiteRT (formerly TFLite) is Google's on-device ML framework. Compared to GGUF/llama.cpp:
Primary: Offline Rust programming tutor on Android (Pixel 8 Pro tested) via RustSensei app or Google AI Edge Gallery, with GPU/NPU-accelerated on-device inference.
Out-of-scope: General-purpose chat, non-Rust programming, safety-sensitive or factual tasks outside Rust development.
"In Go, I just pass values or pointers. What's this ownership thing in Rust?"
"Review this Rust code and explain what the borrow checker is doing:\n\nfn get_longest(a: String, b: String) -> String {\n if a.len() > b.len() { a } else { b }\n}"
"How do I handle errors in Rust? I'm used to Go's if err != nil pattern."
"How does async work in Rust? In Go I just use goroutines and it's simple."
// Add to build.gradle.kts:
// implementation("com.google.ai.edge:litert-lm:latest")
import com.google.ai.edge.litert.lm.LlmInference
val options = LlmInference.Options.builder()
.setModelPath("/path/to/rust_mentor_1.7b.tflite")
.setMaxTokens(512)
.setTemperature(0.7f)
.setTopP(0.9f)
.build()
val llm = LlmInference.createFromOptions(context, options)
val response = llm.generateResponse("Explain Rust's ownership model to a Go developer")
import mediapipe as mp
model_path = "rust_mentor_1.7b_q8_ekv2048.tflite"
llm = mp.tasks.genai.LlmInference.create_from_options(
mp.tasks.genai.LlmInferenceOptions(model_path=model_path, max_tokens=512)
)
response = llm.generate_response("How do I handle errors in Rust?")
| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen3-1.7B |
| Method | QLoRA via Unsloth |
| LoRA Rank (r) | 16 |
| LoRA Alpha | 16 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Epochs | 3 |
| Batch Size | 2 x 4 (effective 8) |
| Learning Rate | 2e-4 (cosine schedule) |
| Max Sequence Length | 2048 |
| Hardware | NVIDIA A100 40GB (Google Colab) |
| Parameter | Value |
|---|---|
| Conversion Tool | litert-torch (re-authored Qwen3) |
| Quantization | Dynamic INT8 |
| KV Cache Length | 2048 |
| Prefill Lengths | 8, 64, 128, 256, 512, 1024 |
| Output Format | .tflite (TFLite Flatbuffers) |
Apache 2.0 for the fine-tuned model; base model (Qwen/Qwen3-1.7B) license also applies.