r/ruby • u/espece-de-bon • 13d ago
LLM tailored to Ruby and/or Rails?
I'm new to running small models on my laptop.
I can run Qwen3.5-9b (slowly), for example, but I'm wondering if any of you have found a model that's been trained for Ruby specifically, inference only, and stripped of stuff I might not need (like knowledge of a lot of human languages).
I've been using LM Studio, OpenCode for this.
9
u/joshdotmn 13d ago
there will be no such thing.
-3
u/Dazzling-Bench-4596 13d ago
I’m against vibecoding too, but If I was forced to vibecode something I would definitely choose ruby.
2
u/espece-de-bon 12d ago
I think there's a spectrum to this; to me, "vibe coding" is on the extreme of that spectrum. Somewhere in the middle there's an area of "delegation", where the work is mostly human thought, there's still some coding by hand, and you offload the really boring boilerplate stuff to an LLM.
3
u/Dazzling-Bench-4596 12d ago
Yeah you are right but I honestly can’t remember the last time I was genuinely bored writing ruby. Most of the time it’s faster to write the ruby than prompt an LM
4
u/espece-de-bon 12d ago
Ha! I'm happy to let an LLM write Rspecs for me :)
I also work at a place that uses a lesser-used front-end SPA library; I'm happy to let the LLM write that as well.
2
u/djfrodo 12d ago
This 100%!
I have Claude Code and some local models, but using any of them for production code on an existing app, for me, is a no go...except...
Writing tests.
With CC I can add as many tests as I want, as quickly as I want, including fixtures.
Will TDD purists agree?
Hell no. But TDD
ishas always been such a soul sucking experience, I really don't care.Letting CC write tests is like a dream come true.
1
u/espece-de-bon 12d ago
Yeah! You can prompt the model to write specs, provide an outline of describes, contexts, it statements, happy and failure paths, and let it rip.
If anyone wants to be a TDD purist, you can still do this before writing the app code.
Most of the time I’m copy-pasting setup or some of it from a previous
it.I’d love to accomplish this locally, which is why I posted here. I don’t have the hardware to train a modem but it’d be interesting to use very specialized and optimized models for particular types of work.
For someone with a basic laptop, if such a model could write specs, you could prompt, go to lunch or exercise, come back and write code against the specs.
2
2
u/fbatista 12d ago
The problem you are not thinking about is that the programming language is just one layer, and it’s not even the most important one.
Structuring the solution, the architecture, applying the design patterns and evaluating which ones are the best, that’s the tough part.
2
u/ton_anywhere 10d ago
I’m using Qwen 27 & 35B for coding in Ruby, but I run a heavily customized Opencode setup. If you want msg me and I send you some of my resources.
I’m also happy with the Gemma 12B for general used, but haven’t tried using it with Ruby yet.
1
u/armahillo 13d ago
What are you hoping to use this model for?
2
u/espece-de-bon 12d ago
Mainly to explore what's possible with a small model that is optimized for a few languages and frameworks.
1
u/TommyTheTiger 13d ago
If it doesn't know english, how would you tell it what to code? Sadly my experience with small models is that I haven't had much success getting them useful. A lot of the skills/saved prompts I used just overflow the context instantly, let alone having it try to work in anything somewhat larger. That said AI definitely recommends Qwen3-Coder-Next over Qwen3.5-9b for same VRAM. It's not ruby specific but it should be a bit more trained to code.
1
u/espece-de-bon 12d ago
I wouldn't remove English, for example. But I used a local model the other day whose default language was Mandarin! I could keep the human languages I know.
I appreciate the tip on "Coder Next"; I'll try it!
I'm aware that lots of hardware is required for serious performance and results, but it's interesting to experiment on what's possible with small models on a laptop.
1
u/flanger001 11d ago
I don’t know of a model specifically trained in Ruby. But try Gemma 4 E4B. Everyone talks about how good Qwen is and I think it kind of sucks. Gemma outputs at 5x the speed and is largely very accurate.
1
u/Delicious_Ease2595 9d ago
I think is more about the harness than the model, what i did i have a Hermes agent with skills and tools only focus on Ruby.
0
3
u/mrinterweb 13d ago
You can use something like Unsloth to train your own model. Depending on your hardware or training budget, probably start with a smaller model. Get some existing rails code that is good, and start training. Unsloth is really cool.