Instructions to use jokernifty/Krix1-0.2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jokernifty/Krix1-0.2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jokernifty/Krix1-0.2b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jokernifty/Krix1-0.2b") model = AutoModelForCausalLM.from_pretrained("jokernifty/Krix1-0.2b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jokernifty/Krix1-0.2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jokernifty/Krix1-0.2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jokernifty/Krix1-0.2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jokernifty/Krix1-0.2b
- SGLang
How to use jokernifty/Krix1-0.2b 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 "jokernifty/Krix1-0.2b" \ --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": "jokernifty/Krix1-0.2b", "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 "jokernifty/Krix1-0.2b" \ --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": "jokernifty/Krix1-0.2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jokernifty/Krix1-0.2b with Docker Model Runner:
docker model run hf.co/jokernifty/Krix1-0.2b
Krix1-0.2b
A ~122M-parameter (≈0.2B) Llama-style decoder, pretrained from scratch on Hindi text. Every weight was trained from random initialization — this is not a fine-tune of an existing model.
What it is
- Architecture: Llama-style decoder — RMSNorm (pre-norm), RoPE, SwiGLU MLP, no biases, tied embeddings.
- Size: 12 layers, hidden 768, 12 heads, context 1024, vocab 48,000 → 121.8M params.
- Tokenizer: custom SentencePiece BPE (48k) trained on Hindi, with byte fallback.
- Data: AI4Bharat Sangraha (Hindi, Devanagari —
verified+unverified), ~3B tokens seen during training out of ~19.6B available. - Training: bf16, AdamW, cosine LR 6e-4→6e-5, ~0.5M tokens/step, ~6k steps on a single A100. Final val perplexity ≈ 19.
Honest limitations
This is a base completion model and a small one:
- It produces fluent, grammatical Hindi — that's what it's good at.
- It has no reliable world knowledge and will confidently make up facts. Knowledge needs far more scale.
- It is not instruction-tuned — it continues a prompt, it does not follow commands or chat.
- It only knows Hindi.
Usage
Tokenize with sentencepiece (the bundled hin_sp_48k.model) and run the model with transformers:
import torch, sentencepiece as spm
from huggingface_hub import hf_hub_download
from transformers import AutoModelForCausalLM
repo = "jokernifty/Krix1-0.2b"
sp = spm.SentencePieceProcessor(model_file=hf_hub_download(repo, "hin_sp_48k.model"))
model = AutoModelForCausalLM.from_pretrained(repo).eval()
prompt = "भारत एक विशाल देश"
ids = torch.tensor([sp.encode(prompt)])
out = model.generate(ids, max_new_tokens=150, do_sample=True,
temperature=0.8, top_k=200, eos_token_id=2, pad_token_id=3)
print(sp.decode(out[0].tolist()))
Note: tokenization uses SentencePiece directly (not
AutoTokenizer), because the tokenizer is a SentencePiece BPE model with byte fallback. This guarantees encoding identical to training.
License & data
Released for research and educational use. Trained on AI4Bharat Sangraha — review that dataset's terms before redistributing derivatives.
- Downloads last month
- 37