Text Generation
Transformers
GGUF
English
code
python
small-model
pretrained-from-scratch
gpt2
from-scratch
coding
SLM
Run this model with HF Jobs
Run Rohanify/PyBlissa-Coder-50M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Rohanify/PyBlissa-Coder-50M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Rohanify/PyBlissa-Coder-50M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Rohanify/PyBlissa-Coder-50M. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Rohanify/PyBlissa-Coder-50M. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Rohanify/PyBlissa-Coder-50M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rohanify/PyBlissa-Coder-50M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rohanify/PyBlissa-Coder-50M")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Rohanify/PyBlissa-Coder-50M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Rohanify/PyBlissa-Coder-50M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Rohanify/PyBlissa-Coder-50M:F32 # Run inference directly in the terminal: llama cli -hf Rohanify/PyBlissa-Coder-50M:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Rohanify/PyBlissa-Coder-50M:F32 # Run inference directly in the terminal: llama cli -hf Rohanify/PyBlissa-Coder-50M:F32
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Rohanify/PyBlissa-Coder-50M:F32 # Run inference directly in the terminal: ./build/bin/llama cli -hf Rohanify/PyBlissa-Coder-50M:F32
Use Docker
docker model run hf.co/Rohanify/PyBlissa-Coder-50M:F32
- Llama new
- LM Studio
- Jan
- vLLM
How to use Rohanify/PyBlissa-Coder-50M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rohanify/PyBlissa-Coder-50M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rohanify/PyBlissa-Coder-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rohanify/PyBlissa-Coder-50M:F32
- SGLang
How to use Rohanify/PyBlissa-Coder-50M 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 "Rohanify/PyBlissa-Coder-50M" \ --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": "Rohanify/PyBlissa-Coder-50M", "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 "Rohanify/PyBlissa-Coder-50M" \ --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": "Rohanify/PyBlissa-Coder-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Rohanify/PyBlissa-Coder-50M with Ollama:
ollama run hf.co/Rohanify/PyBlissa-Coder-50M:F32
- Unsloth Desktop
- Docker Model Runner
How to use Rohanify/PyBlissa-Coder-50M with Docker Model Runner:
docker model run hf.co/Rohanify/PyBlissa-Coder-50M:F32
- Lemonade
How to use Rohanify/PyBlissa-Coder-50M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Rohanify/PyBlissa-Coder-50M:F32
Run and chat with the model
lemonade run user.PyBlissa-Coder-50M-F32
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files123---license: mit---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113---license: mitlanguage:- enlibrary_name: transformerspipeline_tag: text-generationtags:- code- python- gguf- small-model- pretrained-from-scratch- gpt2- from-scratch- coding- SLM---# PyBlissa-Coder-50MA 50M-parameter Python code generation model trained from scratch on a single RTX 5080. Built as part of the **PRIME** lineup of small, locally-runnable AI systems.Despite its size, PyBlissa punches well above its weight on Python instruction-following tasks. Trained near-Chinchilla optimal (~13 tokens/parameter) for maximum capacity utilization.[loss_visualization.png]## Stats| | ||---|---|| Parameters | 50.2M || Architecture | Decoder-only transformer (GPT-2 style) || Context length | 1024 tokens || Vocab size | 16,000 (custom ByteLevel BPE) || Train tokens | 166M || Final val loss | 0.474 || Training time | 73 minutes (RTX 5080) |## Architecture```d_model: 640n_layer: 8n_head: 8d_ff: 2560block_size: 1024tied embeddings, pre-LN, no bias, GELU MLP, SDPA attention```## Training dataTwo-source code-instruction corpus, 425k samples β 166M tokens after BPE tokenization:- **`nvidia/OpenCodeInstruct`** β 400k high-quality instruction-code pairs- **`flytech/python-codes-25k`** β 25k Python-focused instruction-code pairsTrained for 4 epochs with cosine LR schedule (3e-4 β 3e-5), bf16 autocast, batch size 20.## Prompt formatTrained on a strict prefix structure:```PROMPT: <your instruction>CODE:<generated code>```Anything else is out-of-distribution. The Modelfile in this repo handles the formatting automatically.## Usage β Ollama (recommended)```bashollama run hf.co/Rohanify/PyBlissa-Coder-50M```Or pull the GGUF directly and create locally:```bashollama create pyblissa-coder -f Modelfileollama run pyblissa-coder "write a function to merge two sorted lists"```## Usage β llama.cpp```bash./llama-cli -m PyBlissa-Coder-50M-F32.gguf \-p "PROMPT: write a function to reverse a string\nCODE:\n" \--temp 0.8 --top-k 50 --top-p 0.95 -n 256```## Files| File | Purpose ||---|---|| `PyBlissa-Coder-50M-F32.gguf` | Full-precision GGUF weights || `Modelfile` | Ollama config (prompt template, stop tokens, sampling) || `tokenizer.json` | Custom 16k BPE tokenizer |## Limitations- Python-only β other languages weren't in training data- 1024-token context β longer programs get truncated- Small flytech subset (~6% of training data) contains code with unescaped quote bugs; the model occasionally inherits this pattern- No safety tuning, no RLHF β base model only## AcknowledgmentsDatasets by NVIDIA and flytech. Built using the nanoGPT-style training recipe with custom tokenization. Tooling: PyTorch, HuggingFace `tokenizers`, llama.cpp for GGUF conversion.---Made by Rohan. Also known as ElectroPlayin on YouTube
README.md+110