CoolFace
Modelpublic

bytecodehr/qwen3-coder-30b-rails

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
2likes182downloads
Model Card

qwen3-coder-30b-rails

A 31B parameter Mixture-of-Experts model fine-tuned for Ruby on Rails code generation. Trained on 111,000 samples extracted from our own internal Rails projects.

Built by Bytecode.

Model Details

PropertyValue
Base modelQwen3-Coder-30B-A3B-Instruct
ArchitectureQwen3 MoE (31B total, 3B active)
Training methodQLoRA (rank 16) via Unsloth
Training data111K samples from internal Rails projects
Training cost~$32 (A100 80GB, ~26 hours)
QuantizationGGUF Q4KM (18.6 GB), Q5KM (21.7 GB)

What it does

This model writes idiomatic Ruby on Rails code following specific conventions:

  • Devise authentication
  • Namespaced concerns instead of service objects
  • Sidekiq instead of Solid Queue
  • State-as-records instead of boolean flags
  • DaisyUI drawer layouts instead of ActiveAdmin

It generates code that follows these patterns without prompt engineering — the conventions are baked into the weights.

Usage with Ollama

bash
# Download and run
ollama run bytecodehr/qwen3-coder-30b-rails

# Example prompt
ollama run bytecodehr/qwen3-coder-30b-rails "Write a Rails controller for managing user subscriptions with state transitions"

Memory requirements

FormatGGUF SizeMin RAMRecommended
Q5KM21.7 GB24 GB32 GB
Q4KM18.6 GB20 GB24 GB

Rule of thumb: GGUF file size + 2–4 GB for KV cache and overhead.

Training

Trained with LoRA (rank 16, alpha 16) on attention projection layers (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj). Only 0.78% of parameters were trained.

The dataset pipeline:

  1. 1.Extracted code from our internal Rails projects
  2. 2.15-step cleaning and deduplication pipeline
  3. 3.111K final training samples
  4. 4.Includes 29 contrastive pairs (wrong way vs right way)
  5. 5.Source diversity cap at 20% per repository

Full details in our blog posts:

Why Ruby for LLMs?

Ruby uses 42–45% fewer tokens than TypeScript across every major LLM tokenizer. That means more code fits in the context window, generations are faster, and costs are lower. Read our analysis: Why Ruby Is the Better Language for LLM-Powered Development.

Other models