Inspiration
Agentic AI has made a break through in technology in the past few years, but chief among the use cases of generative AI has been coding. Those who do not know how to code become empowered with a new innovative skill and those who already knew became even more efficient.
But not all models are easily accessible. Some people cannot afford the rising token prices. Some companies have data that is far too sensitive to share over the internet with an LLM provider.
In August of this year, Pinterest has reported over 92% savings in LLM transaction costs. Uber has reported 52% savings per AI agent session. Lyzr.ai, Axis, Factory, and OpenPipe are other companies that have reported similar results. All savings from hosting open source models on their own infrastructure rather than relying on the tech giants' expensive models.
What is CodeSquire
CodeSquire is an open source, lightweight coding agent leveraging the harness mini-swe-agent. After installing, users are able to run the command "codesquire" to open up the CLI tool and prompt the agent, approve of actions, and watch it solve complex coding issues within the terminal.
How we built it
Our team trained the LLM using Hugging Face's TRL library (Transformer Reinforcement Learning). The base model was Qwen-3-8B, which we then performed supervised fine-tuning on a RTX PRO 6000 WS (96 GB VRAM) GPU, using a dataset of reasoning traces and tool calls from a larger model of the same family (Qwen-3-Coder-30B). We trained it on a total of 18.6 million tokens across 2 epochs.
Accomplishments that we're proud of
We evaluated our agent on a subset of a benchmark called Swe-Bench, we used 25 samples hand picked for their ranges in difficulty and uniqueness. The benchmark asks the agent to read through a given open source git repository and address a prompt in the form of a github issues to resolve a bug or implement a new feature.
Results
Our agent achieved 200% improvement in github issues resolved over the base model (Qwen-3-8B) on the 25 sample subset as well as a 100% reduction in format errors. We have our full evaluation report on our Hugging Face repo.
What we learned
We learned how to work with a variety of state of the art open source frameworks such as vLLM, LiteLLM, TRL, and swe-agent.
What's next for CodeSquire
To continue our SFT training as we could have trained it on much more data, as we only used 1,000 training samples out of nearly 400,000. We also would love to implement RLVR using GRPO on Transformers Reinforcement Learning, the Hugging Face framework.
Built With
- docker
- huggingface
- litellm
- mini-swe-agent
- qwen
- swe-bench
- vast.ai
- vllm
Log in or sign up for Devpost to join the conversation.