Run this model with HF Jobs
Run JP-AI-2026/Sweepcoder_300M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/JP-AI-2026/Sweepcoder_300M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/JP-AI-2026/Sweepcoder_300M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/JP-AI-2026/Sweepcoder_300M. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/JP-AI-2026/Sweepcoder_300M. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use JP-AI-2026/Sweepcoder_300M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JP-AI-2026/Sweepcoder_300M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JP-AI-2026/Sweepcoder_300M")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JP-AI-2026/Sweepcoder_300M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JP-AI-2026/Sweepcoder_300M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JP-AI-2026/Sweepcoder_300M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JP-AI-2026/Sweepcoder_300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JP-AI-2026/Sweepcoder_300M
- SGLang
How to use JP-AI-2026/Sweepcoder_300M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "JP-AI-2026/Sweepcoder_300M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JP-AI-2026/Sweepcoder_300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "JP-AI-2026/Sweepcoder_300M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JP-AI-2026/Sweepcoder_300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JP-AI-2026/Sweepcoder_300M with Docker Model Runner:
docker model run hf.co/JP-AI-2026/Sweepcoder_300M
SweepCoder-300M
SweepCoder-300M is a ~304M parameter code model trained from scratch on 45B tokens, focused specifically on Python, JavaScript, HTML, C, and C++.
Most small models try to do a bit of everything—general chat, trivia, and dozens of programming languages—which leaves very little capacity for writing clean, reliable code. For this release, I kept the parameter count compact and dedicated the entire training run to five core languages so it can run fast locally while still handling real syntax, types, and boilerplate well.
Specs
- Developer: JP-AI-2026
- Parameters: ~304M (
bf16, tied embeddings) - Architecture: Llama-style decoder (24 layers,
d_model=896,intermediate_size=2432, SwiGLU, RMSNorm) - Attention: Grouped-Query Attention (14 Q heads, 2 KV heads,
head_dim=64) - Context Length: 4,096 tokens (RoPE
theta=100000) - Vocab: 49,152 tokens (includes
<fim_prefix>,<fim_suffix>,<fim_middle>) - License: Apache 2.0
How It Was Trained
The model was pre-trained from scratch on 45 billion tokens across four main buckets:
- Filtered Code: Clean, educational open-source code across Python, C++, JavaScript, C, and HTML.
- Syntax-Verified Synthetic Example: Self-contained coding problems, tutorials, and bug-fix pairs. Every synthetic sample was passed through language parsers/compilers (
ast,node,gcc/g++) before training to filter out broken syntax. - Math & Logic: Step-by-step math and algorithmic reasoning data to help with indexing, loops, and control flow.
- Technical Docs: Computer science reference text and documentation so the model handles comments and docstrings naturally.
Training followed a Warmup-Stable-Decay (WSD) schedule using Muon for 2D weight matrices and AdamW for embeddings/norms, with a final annealing phase weighted toward the cleanest code examples. Around 30% of code files were formatted with Fill-in-the-Middle (FIM) during pre-training so it works out of the box for inline autocomplete.
Usage
Code Continuation
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "JP-AI-2026/SweepCoder-300M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "def merge_sorted_lists(a: list[int], b: list[int]) -> list[int]:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=128,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Fill-in-the-Middle (FIM)
prefix = "int factorial(int n) {\n if (n <= 1) return 1;\n "
suffix = "\n}"
prompt = f"<fim_prefix>{prefix}<fim_suffix>{suffix}<fim_middle>"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=64,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(out[0], skip_special_tokens=False))
What to Expect
Good for:
- Fast local IDE autocomplete (FIM) on CPU or low-VRAM GPUs
- Writing standalone functions, standard algorithms, and data structures
- C/C++ boilerplate, Python scripting, and basic HTML/JS DOM logic
Limitations:
- At 304M parameters, it works best on short-to-medium snippets (~20–120 lines). On long multi-file tasks, it will lose track of context.
- Trained strictly on Python, JS, HTML, C, and C++—don't expect strong results on other languages or general chat.
- Always test generated code before using it in real projects.
Citation
@misc{sweepcoder300m_2026,
title = {SweepCoder-300M},
author = {JP-AI-2026},
year = {2026},
url = {https://huggingface.co/SweepCoder-300M}
}