Instructions to use VarunHujan/Karna-49M-SFT-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use VarunHujan/Karna-49M-SFT-Model 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 VarunHujan/Karna-49M-SFT-Model:F16 # Run inference directly in the terminal: llama cli -hf VarunHujan/Karna-49M-SFT-Model:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf VarunHujan/Karna-49M-SFT-Model:F16 # Run inference directly in the terminal: llama cli -hf VarunHujan/Karna-49M-SFT-Model:F16
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 VarunHujan/Karna-49M-SFT-Model:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf VarunHujan/Karna-49M-SFT-Model:F16
Use Docker
docker model run hf.co/VarunHujan/Karna-49M-SFT-Model:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use VarunHujan/Karna-49M-SFT-Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VarunHujan/Karna-49M-SFT-Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VarunHujan/Karna-49M-SFT-Model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VarunHujan/Karna-49M-SFT-Model:F16
- Ollama
How to use VarunHujan/Karna-49M-SFT-Model with Ollama:
ollama run hf.co/VarunHujan/Karna-49M-SFT-Model:F16
- Unsloth Desktop
- Docker Model Runner
How to use VarunHujan/Karna-49M-SFT-Model with Docker Model Runner:
docker model run hf.co/VarunHujan/Karna-49M-SFT-Model:F16
- Lemonade
How to use VarunHujan/Karna-49M-SFT-Model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull VarunHujan/Karna-49M-SFT-Model:F16
Run and chat with the model
lemonade run user.Karna-49M-SFT-Model-F16
List all available models
lemonade list
- Atomic Chat
π Karna-49M Model (GGUF Formats)
Karna-49M is a hyper-optimized 49.38 Million parameter Small Language Model (SLM) engineered for long-form narrative generation, character-anchored dialogues, and multi-genre creative writing.
Trained from scratch and fine-tuned using Supervised Fine-Tuning (SFT) with ChatML format, it achieves fluent, coherent storytelling with instant Time-To-First-Token (<100ms) and ~35+ tokens/second on standard laptop CPUs.
π¦ Available GGUF Quantizations
| File Name | Format | Size | Description |
|---|---|---|---|
karna_49m_sft_f16.gguf |
FP16 | ~145.8 MB | Gold Master: Full 16-bit precision, highest fidelity, zero quantization loss. |
karna_49m_sft_q8_0.gguf |
Q8_0 | ~78.4 MB | Recommended: 8-bit quantization with near-lossless perplexity. |
karna_49m_sft_q4_0.gguf |
Q4_0 | ~42.4 MB | Ultra-Lightweight: 4-bit quantization, fits anywhere, fast on micro-devices. |
π§ Architecture Specification
- Parameters: 49,384,384 (~49.38M)
- Backbone: LLaMA-style Transformer Decoder
- Attention: Grouped-Query Attention (GQA 8 Query Heads : 4 KV Heads)
- Context Window: 2,048 tokens
- Hidden Dimension: 448
- Layers: 12
- Feed-Forward: SwiGLU ($d_{ffn} = 1,216$)
- Positional Encoding: RoPE ($\theta = 10,000.0$)
- Normalization: RMSNorm ($\epsilon = 10^{-5}$)
- Vocabulary: 50,304 tokens (GPT-2 BPE + ChatML Special Control Tokens)
π How to Run
1. With llama.cpp
# Run interactive chat
./llama-cli -m karna_49m_sft_f16.gguf -p "<|im_start|>user
Write a story about a dragon guarding a hidden garden.<|im_end|>
<|im_start|>assistant
" -n 256 --temp 0.7
2. With Ollama
Create a file named Modelfile:
FROM ./karna_49m_sft_f16.gguf
TEMPLATE """<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
PARAMETER temperature 0.7
PARAMETER top_k 40
PARAMETER repeat_penalty 1.2
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"
Then create and run:
ollama create karna-49m -f Modelfile
ollama run karna-49m "Write a story about an astronomer who discovered a singing star."
### 3. With LM Studio
Simply drag and drop any `.gguf` file into LM Studio's local models folder.
---
## π Prompt Format (ChatML)
```text
<|im_start|>user
Write a short story about an old clockmaker in Prague.<|im_end|>
<|im_start|>assistant
π License
MIT License
- Downloads last month
- 28,987
4-bit
8-bit
16-bit