Instructions to use yasserrmd/AgenticCoder-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yasserrmd/AgenticCoder-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yasserrmd/AgenticCoder-4B") 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("yasserrmd/AgenticCoder-4B") model = AutoModelForCausalLM.from_pretrained("yasserrmd/AgenticCoder-4B", 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 yasserrmd/AgenticCoder-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yasserrmd/AgenticCoder-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yasserrmd/AgenticCoder-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yasserrmd/AgenticCoder-4B
- SGLang
How to use yasserrmd/AgenticCoder-4B 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 "yasserrmd/AgenticCoder-4B" \ --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": "yasserrmd/AgenticCoder-4B", "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 "yasserrmd/AgenticCoder-4B" \ --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": "yasserrmd/AgenticCoder-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yasserrmd/AgenticCoder-4B with Docker Model Runner:
docker model run hf.co/yasserrmd/AgenticCoder-4B
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 "yasserrmd/AgenticCoder-4B" \
--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": "yasserrmd/AgenticCoder-4B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'๐ง AgenticCoderโ4B
AgenticCoderโ4B is a compact 4B parameter language model designed for autonomous agent workflows and intelligent code reasoning. It merges the planning and tool-use strengths of Jan-nano with the coding and logic capabilities of Qwen3โ4BโCodeโReasoning, creating a balanced model ideal for real-world assistant scenarios, research agents, and smart development tools.
โจ Key Features
๐ Agentic Planning & MCP Alignment
Trained on datasets and architectures optimized for multi-step reasoning, task decomposition, and memoryโcontextual workflows.๐ป Code Understanding & Reasoning
Strong capabilities in Python code generation, script explanation, optimization, and multi-turn task development.๐งฐ Tool Use Simulation
Handles realistic tool interaction prompts such as CSV analysis, OCR, and file parsing in code.๐ฆ Compact & Efficient (4B)
Lightweight enough for cost-efficient deployment, edge device integration, and fine-tuning.
๐ ๏ธ Merge Details
- Merge Method: SLERP (
t = 0.4) - Base Model:
Menlo/Jan-nano - Merged With:
ertghiu256/qwen3-4b-code-reasoning - Precision:
float16 - Tokenizer Source:
Menlo/Jan-nano
๐ Example Use Cases
โ
"Design a 3-week beginner Python curriculum including AI tools."
โ
"Write a Python function to recursively scan JSON for a key, without using recursion."
โ
"Read a folder of images and extract text using OCR, save to files."
โ
"Summarize trends in a sales CSV and visualize monthly performance."
๐ License & Use
This model is provided for research and development use under the terms of the base modelsโ respective licenses. Please ensure compliance before commercial usage.
๐งฌ Citation
If you use this model, consider citing it as:
@misc{agenticcoder4b2025,
title={AgenticCoder-4B: A Compact Agent + Code Reasoning Model},
author={Yasser, M.},
year={2025},
url={https://huggingface.co/your-username/AgenticCoder-4B}
}
๐ค Acknowledgements
- Menlo/Jan-nano by Menlo Systems
- Qwen3โ4BโCodeโReasoning by ertghiu256
- MergeKit, SLERP, Hugging Face
- Downloads last month
- 145
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "yasserrmd/AgenticCoder-4B" \ --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": "yasserrmd/AgenticCoder-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'