Instructions to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="razor5050/codex-qwen2-5-0-5b-unsloth-codex1m")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("razor5050/codex-qwen2-5-0-5b-unsloth-codex1m", dtype="auto") - PEFT
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/razor5050/codex-qwen2-5-0-5b-unsloth-codex1m
- SGLang
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m 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 "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m" \ --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": "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m", "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 "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m" \ --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": "razor5050/codex-qwen2-5-0-5b-unsloth-codex1m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio new
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m 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 razor5050/codex-qwen2-5-0-5b-unsloth-codex1m 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 razor5050/codex-qwen2-5-0-5b-unsloth-codex1m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for razor5050/codex-qwen2-5-0-5b-unsloth-codex1m to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="razor5050/codex-qwen2-5-0-5b-unsloth-codex1m", max_seq_length=2048, ) - Docker Model Runner
How to use razor5050/codex-qwen2-5-0-5b-unsloth-codex1m with Docker Model Runner:
docker model run hf.co/razor5050/codex-qwen2-5-0-5b-unsloth-codex1m
CodeX Qwen2.5 0.5B Unsloth SFT - 1M Rows
This repository is prepared for a cloud-only Unsloth LoRA supervised fine-tuning run of Qwen/Qwen2.5-0.5B-Instruct on the first 1,000,000 rows of Modotte/CodeX-2M-Thinking.
Status: training setup/provisioning. Final metrics, checkpoints, adapters, inference samples, and report will be uploaded here during/after training.
Base Model
- Base:
Qwen/Qwen2.5-0.5B-Instruct - Architecture:
Qwen2ForCausalLM - Parameters: ~494M
- Context length: 32,768 tokens
- License: Apache-2.0
Dataset
- Dataset:
Modotte/CodeX-2M-Thinking - Planned subset: first 1,000,000 rows
- Columns used:
inputβ user/problem promptoutputβ assistant solution/reasoning/code response
- Intended task: coding instruction following, algorithmic reasoning, solution explanation, and code generation.
Planned Training Method
- Framework: Unsloth + TRL SFTTrainer + PEFT LoRA
- Quantized base loading: 4-bit
- LoRA rank: 32
- LoRA alpha: 64
- LoRA dropout: 0
- Target modules:
q_proj,k_proj,v_proj,o_projgate_proj,up_proj,down_proj
- Max sequence length for first run: 8,192 tokens
- Epochs: 1
- Checkpointing: approximately every 2 hours
- Durable storage: Hugging Face Hub checkpoints and metrics
Planned Artifacts
During training, this repo will receive:
checkpoints/checkpoint-*β resumable trainer checkpointsmetrics/metrics.jsonlβ train/eval logsmetrics/status.jsonβ latest job statusfinal_lora_adapter/β final PEFT LoRA adapterfinal_merged_16bit/β merged model if cloud disk/runtime allowsreports/inference_samples.jsonβ post-training inference outputsreports/TRAINING_REPORT.mdβ final training report
Intended Use
This model is intended for experimentation with small code-reasoning SFT models, especially:
- Python coding assistance
- algorithm explanation
- competitive-programming style solution drafting
- reasoning-heavy coding responses
Limitations
- This is a sub-500M parameter model, so it should not be expected to match larger coding models.
- The dataset is synthetic and may transfer dataset-specific response style.
- Long outputs may still be limited by the training sequence length and generation settings.
- The model may produce incorrect code; generated solutions require testing and review.
Safety and Evaluation
Post-training evaluation will include sample inference prompts and loss tracking. This repository should not be treated as production-ready until final metrics and qualitative outputs are reviewed.