Instructions to use MenteEAI/MenteE-Code-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MenteEAI/MenteE-Code-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MenteEAI/MenteE-Code-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MenteEAI/MenteE-Code-3B") model = AutoModelForCausalLM.from_pretrained("MenteEAI/MenteE-Code-3B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MenteEAI/MenteE-Code-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MenteEAI/MenteE-Code-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MenteEAI/MenteE-Code-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MenteEAI/MenteE-Code-3B
- SGLang
How to use MenteEAI/MenteE-Code-3B 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 "MenteEAI/MenteE-Code-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MenteEAI/MenteE-Code-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "MenteEAI/MenteE-Code-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MenteEAI/MenteE-Code-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MenteEAI/MenteE-Code-3B with Docker Model Runner:
docker model run hf.co/MenteEAI/MenteE-Code-3B
MenteE Code 3B (v1)
MenteE Code is a coding-agent assistant built by MenteE. This is v1: a LoRA fine-tune of Qwen/Qwen2.5-Coder-3B-Instruct (Apache-2.0), merged into a standalone model and trained to behave as MenteE Code.
Ask it who it is and it will tell you: "I am MenteE Code, a coding assistant built by MenteE." The chat template injects the MenteE identity by default, so every client (transformers, vLLM, llama.cpp, Ollama) presents it correctly.
Training (all numbers measured)
| Item | Value |
|---|---|
| Base | Qwen2.5-Coder-3B-Instruct (3.09B params) |
| Data | 53,567 schema-validated agent trajectories (deduplicated from 78,212) |
| Sources | SWE-agent, OpenHands, R2E-Gym, NVIDIA SWE-Zero subsets + MenteE collector + identity Q&A |
| Method | LoRA r=8, ฮฑ=16, all-linear targets, bf16, gradient checkpointing |
| Schedule | 1,250 steps ยท 1 epoch ยท effective batch 16 ยท lr 2e-4 ยท seq len 4,096 |
| Context | 32,768 native ยท 131,072 via YaRN (factor 4.0, set in config.json) |
| Hardware | 1ร RTX 5090 (32 GB) ยท 5 h 32 m ยท ~$0.13 |
| Final | loss 1.62 โ 0.317 ยท token accuracy 91.5% |
Benchmarks โ measured, not estimated
HumanEval pass@1, greedy decoding, 50 problems, both models run on identical hardware with an identical harness (generated code executed against the official unit tests):
| Model | pass@1 |
|---|---|
| Qwen2.5-Coder-3B-Instruct (base) | 94.0% |
| MenteE Code 3B v1 | 50.0% |
We publish this gap on purpose. Failure analysis shows 24 of 25 v1 failures are the same artifact โ systematically doubled closing brackets โ caused by v1's training recipe (loss applied to all trajectory roles, including noisy tool outputs). It is a data-recipe issue, not a capability ceiling. The v2 recipe (assistant-only loss, identity oversampling, LoRA r=16) targets exactly this.
This is a 50-problem subset (~ยฑ14 pt margin) โ directional, not leaderboard-grade.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
t = AutoTokenizer.from_pretrained("MenteEAI/MenteE-Code-3B")
m = AutoModelForCausalLM.from_pretrained("MenteEAI/MenteE-Code-3B", torch_dtype="auto", device_map="auto")
msgs = [{"role": "user", "content": "Write a Python function to reverse a linked list."}]
prompt = t.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
enc = t(prompt, return_tensors="pt").to(m.device)
out = m.generate(**enc, max_new_tokens=512)
print(t.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
GGUF builds (for Ollama / llama.cpp) are published at MenteEAI/MenteE-Code-3B-GGUF.
Roadmap
- v2: assistant-only loss, identity oversampling, LoRA r=16 โ recover base-level coding quality
- Flywheel: real user conversations are logged (opt-in), converted to training data, and folded into future versions
- Eval: SWE-bench Verified subset with a proper agent harness
License & attribution
Apache-2.0, same as the base model. Built on Qwen2.5-Coder-3B-Instruct by the Qwen team โ with gratitude. MenteE is not affiliated with Alibaba or Qwen.
- Downloads last month
- 98





