Instructions to use Piyush00023/coffy-2.4-flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Piyush00023/coffy-2.4-flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Piyush00023/coffy-2.4-flash", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Piyush00023/coffy-2.4-flash", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Piyush00023/coffy-2.4-flash 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 Piyush00023/coffy-2.4-flash:Q4_1 # Run inference directly in the terminal: llama cli -hf Piyush00023/coffy-2.4-flash:Q4_1
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Piyush00023/coffy-2.4-flash:Q4_1 # Run inference directly in the terminal: llama cli -hf Piyush00023/coffy-2.4-flash:Q4_1
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 Piyush00023/coffy-2.4-flash:Q4_1 # Run inference directly in the terminal: ./build/bin/llama cli -hf Piyush00023/coffy-2.4-flash:Q4_1
Use Docker
docker model run hf.co/Piyush00023/coffy-2.4-flash:Q4_1
- Llama new
- LM Studio
- Jan
- vLLM
How to use Piyush00023/coffy-2.4-flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Piyush00023/coffy-2.4-flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Piyush00023/coffy-2.4-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Piyush00023/coffy-2.4-flash:Q4_1
- SGLang
How to use Piyush00023/coffy-2.4-flash 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 "Piyush00023/coffy-2.4-flash" \ --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": "Piyush00023/coffy-2.4-flash", "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 "Piyush00023/coffy-2.4-flash" \ --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": "Piyush00023/coffy-2.4-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Piyush00023/coffy-2.4-flash with Ollama:
ollama run hf.co/Piyush00023/coffy-2.4-flash:Q4_1
- Unsloth Desktop
- Pi
How to use Piyush00023/coffy-2.4-flash with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Piyush00023/coffy-2.4-flash:Q4_1
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Piyush00023/coffy-2.4-flash:Q4_1" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Piyush00023/coffy-2.4-flash with Docker Model Runner:
docker model run hf.co/Piyush00023/coffy-2.4-flash:Q4_1
- Lemonade
How to use Piyush00023/coffy-2.4-flash with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Piyush00023/coffy-2.4-flash:Q4_1
Run and chat with the model
lemonade run user.coffy-2.4-flash-Q4_1
List all available models
lemonade list
- Hermes Agent
How to use Piyush00023/coffy-2.4-flash with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Piyush00023/coffy-2.4-flash:Q4_1
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default Piyush00023/coffy-2.4-flash:Q4_1
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Piyush00023/coffy-2.4-flash with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Piyush00023/coffy-2.4-flash:Q4_1
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "Piyush00023/coffy-2.4-flash:Q4_1" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
โก coffy-2.4-flash
Sparse Mixture-of-Experts Foundation Model for Code Intelligence & Agentic Workflows
Overview โข Key Capabilities โข Specifications โข Architecture โข Quickstart โข PEFT Adapters โข License โข Citation
Overview
coffy-2.4-flash is an open-weights Sparse Mixture-of-Experts (MoE) model. It anchors every representation through 1 Universal Shared Expert (always on) and routes tokens across 8 Fine-Grained Routed Experts (Top-4 dynamic softmax routing).
The model ships at a compact 2.84 Billion parameters โ a deliberately small-footprint MoE: dense-style memory requirements with sparse-MoE specialization. This release restores the original checkpoint with fixed, working modeling code (real causal attention with RoPE, GQA, RMSNorm, and proper top-k expert routing).
Tokenizer note: this checkpoint's embedding table contains 2,048 rows, while the shipped tokenizer emits a larger vocabulary. The modeling code clamps out-of-range token ids so inference always runs; ids โฅ 2048 share the last embedding row. This checkpoint reflects an early training state โ output text is not coherent conversational language yet.
Key Capabilities
- ๐งฉ Compact MoE Design: 8 routed specialists + 1 universal shared anchor expert, Top-4 dynamic routing per token.
- โ๏ธ Custom Architecture:
CoffyMoEForConditionalGenerationwith dedicated expert registry โ foundation, code synthesis, world knowledge, agentic planning, structured logic, analytical reasoning, polyglot algorithms, mathematical rigor. - ๐ง Fixed Inference Stack: real causal self-attention (GQA 32Q/8KV, RoPE) โ replaces the earlier non-functional forward pass.
- ๐งฒ PEFT Adapters: plug-and-play task adapters for Software Engineering (
coding-swe), Math (math-reasoner), and Function Calling (agentic-tools). - ๐ Self-Contained: runs fully offline via
transformerswithtrust_remote_code=True.
Model Specifications
| Parameter | Specification | Description |
|---|---|---|
| Model Name | coffy-2.4-flash | Official release name |
| Architecture | CoffyMoEForConditionalGeneration |
Sparse MoE with Shared Anchor |
| Total Parameters | 2,842,192,512 (2.84B) | Verified from tensor headers |
| Decoder Layers | 2 | Matches the shipped weights |
| Hidden Dimension | 4,096 |
Base representation width |
| Attention | GQA โ 32 Query / 8 KV heads | head_dim = 128, causal, RoPE (ฮธ = 1e7) |
| Total Experts | 8 Routed + 1 Shared | 9 experts per MoE layer |
| Active Experts / Token | Top-4 Routed + 1 Shared | 5 experts activated per token |
| Intermediate Size | 12,288 |
Per-expert FFN width (SwiGLU) |
| Embedding Table | 2,048 rows |
โ ๏ธ see tokenizer note above |
| Weight Precision | bf16 | 4 safetensors shards, 5.69 GB |
| License | Apache-2.0 (open weights) | See License & Availability |
Architecture Deep-Dive
Each decoder layer follows the modern residual recipe:
x = x + SelfAttention(RMSNormโ(x)) # GQA + RoPE, causal
x = x + MoE(RMSNormโ(x)) # shared expert + top-4 routed experts
The MoE block always computes the Universal Shared Expert (baseline fluency & coherence) and dispatches each token to the Top-4 routed experts by softmax gate probability. Routing logits are produced by a linear gate over the hidden state.
The
coffy.visual.*tensors shipped in the checkpoint are a fragment of a vision tower; they are loaded by the modeling code but the tower is not functional in this revision.
Quickstart Guide
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Piyush00023/coffy-2.4-flash"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype="auto")
msgs = [{"role": "user", "content": "Who are you?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=80)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Modular PEFT Task Adapters
Adapters live under lora/ and load with peft on top of the base checkpoint:
| Adapter | Path | Task |
|---|---|---|
coding-swe |
lora/coding-swe |
Software engineering workflows |
math-reasoner |
lora/math-reasoner |
Mathematical reasoning |
agentic-tools |
lora/agentic-tools |
Tool / function calling |
License & Availability
Open weights release.
The model weights in this repository are released openly for download and use under the Apache-2.0 license. The repository contents are provided as-is for inference use.
Citation
@misc{coffy2.4flash,
title = {coffy-2.4-flash: Sparse Mixture-of-Experts Foundation Model},
author = {Piyush00023},
year = {2026},
url = {https://huggingface.co/Piyush00023/coffy-2.4-flash}
}
Contact
For questions, feedback, or collaboration inquiries regarding this model, reach out:
- Downloads last month
- 408