Team Ai
Modelpublic

antiableofnormies/qwen3.5-4b-lora-android-dev

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes8downloads
Model Card

Code Style LoRA for Qwen3.5-4B

A QLoRA adapter fine-tuned on Android project source files to teach Qwen3.5-4B a specific coding style. Designed for llama.cpp (via GGUF conversion) or HuggingFace Transformers + PEFT.

What this adapter does

  • —Learns Kotlin coding patterns: naming conventions, import ordering, brace style, comment density
  • —Captures Android architecture patterns: ViewModel, Repository, Room DB, Retrofit networking
  • —Embeds dependency injection style (Hilt)
  • —No unwanted boilerplate — trained to generate exactly the level of verbosity you use

Training details

ParameterValue
Base modelunsloth/Qwen3.5-4B
MethodQLoRA (4-bit NF4 via Unsloth)
LoRA rankr=16, alpha=16
Target modulesqproj, kproj, vproj, oproj, gateproj, upproj, down_proj
Epochs3
Sequence length2048
Learning rate2e-4 (cosine scheduler)
HardwareT4 GPU (16GB VRAM) via Google Colab
FrameworkUnsloth + TRL SFTTrainer

Usage with Transformers + PEFT

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

model = PeftModel.from_pretrained(
    AutoModelForCausalLM.from_pretrained("unsloth/Qwen3.5-4B", device_map="auto"),
    "antiableofnormies/qwen3.5-4b-lora-android-dev",
)
tokenizer = AutoTokenizer.from_pretrained("antiableofnormies/qwen3.5-4b-lora-android-dev")

Usage with llama.cpp

bash
python convert_lora_to_gguf.py     --base Qwen3.5-4B-Q4_K_M.gguf     --lora ./qwen3.5-4b-style-lora/     --output style-adapter.gguf

llama-server -m Qwen3.5-4B-Q4_K_M.gguf     --lora style-adapter.gguf     --host 0.0.0.0 -ngl 99 --ctx-size 32768 --port 8080 --mlock

# Optional: merge into a standalone GGUF
llama-export-lora -m Qwen3.5-4B-Q4_K_M.gguf     --lora style-adapter.gguf     -o qwen3.5-4b-code-style-merged.gguf

Intended use

This adapter is designed for a local coding assistant (opencode + llama.cpp) that:

  • —Runs entirely on your machine (no API calls)
  • —Respects your existing code conventions
  • —Avoids unwanted boilerplate that cloud APIs tend to add
  • —Matches the patterns found in the training projects

Limitations

  • —Trained on a personal codebase — style may not generalize to unrelated projects
  • —LoRA rank 16 captures high-level style (naming, structure) but not deep domain knowledge
  • —Jetpack Compose UI code was explicitly excluded from training
  • —English-only code and comments