Instructions to use mrsandip/Alfa-Code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrsandip/Alfa-Code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mrsandip/Alfa-Code")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mrsandip/Alfa-Code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mrsandip/Alfa-Code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrsandip/Alfa-Code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mrsandip/Alfa-Code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mrsandip/Alfa-Code
- SGLang
How to use mrsandip/Alfa-Code 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 "mrsandip/Alfa-Code" \ --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": "mrsandip/Alfa-Code", "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 "mrsandip/Alfa-Code" \ --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": "mrsandip/Alfa-Code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mrsandip/Alfa-Code with Docker Model Runner:
docker model run hf.co/mrsandip/Alfa-Code
Alfa Code - Multimodal Coding GGUF
RTX 3050 4GB: use tiny-50M demo. 1B+ needs cloud 8xH100.
1. Data
python scripts/download_data.py --dataset code_small_test --max-rows 500
Output: data/processed/train.jsonl {modality,prompt,think,answer}
2. Tokenizer + Train
python scripts/train_tokenizer.py -> tokenizers/alfa-32k.json (verified 47KB)
pip install torch --index-url https://download.pytorch.org/whl/cu121
python scripts/train.py -> outputs/tiny-50M
3. GGUF
git clone https://github.com/ggerganov/llama.cpp third_party/llama.cpp
python scripts/convert_to_gguf.py --ckpt outputs/tiny-50M --quant Q4_K_M --out outputs/tiny-50M.gguf
4. UI (reasoning live->collapsed + image/file/video)
python app/ui.py -> http://127.0.0.1:7860
5. Hub sync
hf upload mrsandip/Alfa-Code . . --exclude __pycache__ --exclude .venv --commit-message "Update"