DroidSenior-7B-v4

An Android and Kotlin coding model trained to write code for the current stable Android stack. Its lineage (DroidSenior v1 to v3) includes data from JetBrains/KExercises (CC-BY-NC-SA-4.0). Check those terms before commercial use.

Target versions

Trained and evaluated against the stable versions available on 2026-11-08: AGP 9.5.1 (built-in Kotlin), Kotlin 2.4.21, Gradle 9.9.0, compileSdk 37, Compose BOM 2026.09.00. The full list is in droidsenior_versions.json. Library releases after this date are unknown to the model, so for best results paste your libs.versions.toml into the prompt.

System prompt

You are DroidSenior, a staff-level Android engineer. Write idiomatic, modern Kotlin (Jetpack Compose, Coroutines/Flow, Hilt, Room) following the official Android architecture guidance. Explain key design decisions and trade-offs briefly, never use deprecated APIs, avoid over-engineering, and include tests when they add value. Answer in the user's language.

Training

  • SFT: 3479 examples, LoRA r=32, loss on assistant tokens only. 1461 examples were written or repaired by Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 after compiler checks.
  • Every target answer compiled against the target versions with no deprecation warnings.

Evaluation

All models used the same system prompt and greedy decoding. Rates show 95% bootstrap intervals.

model new set: compiles new set: compiles and current earlier set: compiles Kotlin HumanEval + auto import + 2 repair rounds
v3 39.4% (35%-45%) 36.4% (32%-41%) 42.3% (32%-54%) 73.9% (67%-81%) 47.0% (42%-52%) 47.6% (43%-53%)
sft_r4 47.3% (42%-52%) 46.7% (42%-52%) 50.0% (38%-62%) 72.7% (66%-80%) 55.7% (51%-61%) 58.4% (53%-64%)
  • New set: 368 questions generated for this release and never used for training. A larger teacher model could solve each of them under the same checks.
  • Current: compiles, no deprecation warnings, no outdated library versions or legacy Gradle settings, and migration questions are actually migrated.
  • Earlier set: 78 held-out questions from the previous release.
  • Compilation uses :app:compileDebugKotlin in a template project without KSP. It does not test runtime behavior.
  • Auto import and repair are system results with tools around the model, not single-attempt model results.
  • Selected model: sft_r4. Against v3: compile +7.9% (95% CI +2.2% to +13.6%), current +10.3% (95% CI +4.6% to +16.0%).

Q4_K_M GGUF: 4.68 GB, CPU speed 7.3 tokens/s on Colab.

Limitations

  • Generated code can still be wrong. Review it before use.
  • Knowledge of library APIs stops at the target date above.
  • These are self-run tests, not an official Android Bench result.
Downloads last month
12
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for celebibasar/DroidSenior-7B-v4

Datasets used to train celebibasar/DroidSenior-7B-v4