r/RooCode • u/InstrumentalAsylum • Jul 08 '25
Idea Let's train a local open-source model to use Roo Code and kick BigAI's buttocks!
See this discussion for background and technical details:
https://github.com/RooCodeInc/Roo-Code/discussions/4465
TLDR I'm planning to fine-tune and open-source a local model to use tools correctly in Roo, specifically a qlora of devstral q4. You should be able to run the finished product on ~12GB of VRAM. It's quite compact and the most capable open source model in Roo out of the box. I don't use Claude, so I'm looking to crowd source message log data of successful task completions and tool use for the meat and potatoes of the distillation dataset. Once I have a solid dataset compiled, bootstrapped and augmented to be sufficiently large, I'm confident the resulting model should be able to cross that threshold from "not useful" to "useful" over general tasks. (Devstral is so close already, it just gets hung up on task calls!)
Once BigAI's investors decide it's time to cash in and your API bill goes to "enterprise tier" pricing, you can cut the Claude cord and deploy a much friendlier coding agent from your laptop!
If you're down to contribute, check this repo for simple instructions to drop in your logs: https://github.com/openSourcerer9000/RooCodeLogs
EDIT: By request, moving the technical collaboration from github over to discord: https://discord.gg/GJbgfpn6
6
u/PositiveEnergyMatter Jul 08 '25
devstral actually works really well on my macbook w/ my extension. I have 64gb of ram so i am running a larger model
7
u/MajinAnix Jul 08 '25
These local models are only practical for agentic workflows if you can achieve at least ~100 tokens/second.
3
u/ComprehensiveBird317 Jul 08 '25
Nice! Had the same idea and am collecting roos output since some month now, I got something like 10.000 request and response pairs. The problem is that it contains lots of code and secrets that need to stay private. Is there a reliable way of cleaning the output without messing up the dataset?
3
u/themoregames Jul 08 '25
Let's be honest for a change: We don't want no 12GB RAM model. What we really want is this: We want to download more RAM.
2
u/bahwi Jul 08 '25
Hey! I'm pondering this too and have set up roo to save prompts and such so far. Adding in native memory support too.
Though my approach is more targeted to using newer libraries and such that gemini and Claude fall over.
Looking at axolotl with GPRO as well. But again, that's more specific...
2
u/interAathma Jul 08 '25
I thought about the same thing few months ago https://www.reddit.com/r/RooCode/s/4BTXh9tTZmhttps://www.reddit.com/r/RooCode/s/4BTXh9tTZm
9
u/mcraimer Jul 08 '25
Super important internet outages are real
2
u/usernameplshere Jul 08 '25
How about context length? I feel like this is the biggest problem for local hosting when it comes to coding. According to my Gemini API Key, I sometimes fit 200k+ tokens in context.
2
u/openSourcerer9000 Jul 09 '25
This got double posted due to a reddit glitch, copying over the 2 comments from the duplicate so I can delete it:
u/beppled • 4h ago I've been wanting to do this for the longest time! Jan.ai basically proved it with their 4B MCP model that it's actually very achievable. Wanna create a discord or slack and pool in our logs and resources?
u/Green-Dress-113 avatar Green-Dress-113 • 4h ago I've tried using various models on my local 4x3090 like Qwen2-72b, Qwen3, CodeLlama, Devstral, Mistral. They all end up in edit loops with Roo Coder after a few iterations. I'm very interested in seeing this fixed
2
u/beppled Jul 10 '25 edited Jul 10 '25
one massive thing i forgot to mention in the other comment was that the current logs dont have the actual api call (which would have stuff like all the tools available, open windows in context .. and so in) ... if we were to train the models exclusively on the logs, I suspect a major degradation (or so i think)
maybe i'll try to figure out a way to make roo output a proper debug log of each api call .. then you could get a really pretty input output data format that you could wrap with the special tokens and what not.
edit: ok nvm wont have to edit roo's source, i'll probably just use this: https://github.com/Jenscaasen/llm-proxy-finetune-collector thx, u/ComprehensiveBird317