Instructions to use cgus/Replete-Coder-Qwen2-1.5b-exl2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cgus/Replete-Coder-Qwen2-1.5b-exl2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cgus/Replete-Coder-Qwen2-1.5b-exl2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cgus/Replete-Coder-Qwen2-1.5b-exl2") model = AutoModelForCausalLM.from_pretrained("cgus/Replete-Coder-Qwen2-1.5b-exl2") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cgus/Replete-Coder-Qwen2-1.5b-exl2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cgus/Replete-Coder-Qwen2-1.5b-exl2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cgus/Replete-Coder-Qwen2-1.5b-exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cgus/Replete-Coder-Qwen2-1.5b-exl2
- SGLang
How to use cgus/Replete-Coder-Qwen2-1.5b-exl2 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 "cgus/Replete-Coder-Qwen2-1.5b-exl2" \ --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": "cgus/Replete-Coder-Qwen2-1.5b-exl2", "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 "cgus/Replete-Coder-Qwen2-1.5b-exl2" \ --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": "cgus/Replete-Coder-Qwen2-1.5b-exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use cgus/Replete-Coder-Qwen2-1.5b-exl2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cgus/Replete-Coder-Qwen2-1.5b-exl2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cgus/Replete-Coder-Qwen2-1.5b-exl2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cgus/Replete-Coder-Qwen2-1.5b-exl2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="cgus/Replete-Coder-Qwen2-1.5b-exl2", max_seq_length=2048, ) - Docker Model Runner
How to use cgus/Replete-Coder-Qwen2-1.5b-exl2 with Docker Model Runner:
docker model run hf.co/cgus/Replete-Coder-Qwen2-1.5b-exl2
Replete-Coder-Qwen2-1.5b-exl2
Model: Replete-Coder-Qwen2-1.5b
Model creator: Rombodawg
Based on original model: Qwen2-1.5B
Created by: Qwen
Quants
4bpw h6 (main)
4.25bpw h6
4.65bpw h6
5bpw h6
6bpw h6
8bpw h8
Quantization notes
Made with Exllamav2 0.1.6 with the default dataset.
Original model card
Replete-Coder-Qwen2-1.5b
Finetuned by: Rombodawg
More than just a coding model!
Although Replete-Coder has amazing coding capabilities, its trained on vaste amount of non-coding data, fully cleaned and uncensored. Dont just use it for coding, use it for all your needs! We are truly trying to make the GPT killer!

Thank you to TensorDock for sponsoring Replete-Coder-llama3-8b and Replete-Coder-Qwen2-1.5b you can check out their website for cloud compute rental bellow.
Replete-Coder-Qwen2-1.5b is a general purpose model that is specially trained in coding in over 100 coding languages. The data used to train the model contains 25% non-code instruction data and 75% coding instruction data totaling up to 3.9 million lines, roughly 1 billion tokens, or 7.27gb of instruct data. The data used to train this model was 100% uncensored, then fully deduplicated, before training happened.
The Replete-Coder models (including Replete-Coder-llama3-8b and Replete-Coder-Qwen2-1.5b) feature the following:
- Advanced coding capabilities in over 100 coding languages
- Advanced code translation (between languages)
- Security and vulnerability prevention related coding capabilities
- General purpose use
- Uncensored use
- Function calling
- Advanced math use
- Use on low end (8b) and mobile (1.5b) platforms
Notice: Replete-Coder series of models are fine-tuned on a context window of 8192 tokens. Performance past this context window is not guaranteed.
You can find the 25% non-coding instruction below:
And the 75% coding specific instruction data below:
These two datasets were combined to create the final dataset for training, which is linked below:
Prompt Template: ChatML
<|im_start|>system
{}<|im_end|>
<|im_start|>user
{}<|im_end|>
<|im_start|>assistant
{}
Note: The system prompt varies in training data, but the most commonly used one is:
Below is an instruction that describes a task, Write a response that appropriately completes the request.
End token:
<|endoftext|>
Thank you to the community for your contributions to the Replete-AI/code_bagel_hermes-2.5 dataset. Without the participation of so many members making their datasets free and open source for any to use, this amazing AI model wouldn't be possible.
Extra special thanks to Teknium for the Open-Hermes-2.5 dataset and jondurbin for the bagel dataset and the naming idea for the code_bagel series of datasets. You can find both of their huggingface accounts linked below:
Another special thanks to unsloth for being the main method of training for Replete-Coder. Bellow you can find their github, as well as the special Replete-Ai secret sause (Unsloth + Qlora + Galore) colab code document that was used to train this model.
- https://github.com/unslothai/unsloth
- https://colab.research.google.com/drive/1eXGqy5M--0yW4u0uRnmNgBka-tDk2Li0?usp=sharing
Join the Replete-Ai discord! We are a great and Loving community!
- Downloads last month
- 11
Datasets used to train cgus/Replete-Coder-Qwen2-1.5b-exl2
meta-math/MetaMathQA
glaiveai/glaive-function-calling-v2
Evaluation results
- pass@1 on HumanEvalself-reported0.354
- normalized accuracy on AI2 Reasoning Challenge (25-Shot)test set Open LLM Leaderboard
- normalized accuracy on HellaSwag (10-Shot)validation set Open LLM Leaderboard
- accuracy on MMLU (5-Shot)test set Open LLM Leaderboard
- multiple_choice_accuracy on TruthfulQA (0-shot)validation set Open LLM Leaderboard
- accuracy on Winogrande (5-shot)validation set Open LLM Leaderboard
- accuracy on GSM8k (5-shot)test set Open LLM Leaderboard