Instructions to use Avifenesh/k2h-c1-clean with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Avifenesh/k2h-c1-clean with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Avifenesh/k2h-c1-clean", 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("Avifenesh/k2h-c1-clean", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Avifenesh/k2h-c1-clean with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Avifenesh/k2h-c1-clean" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Avifenesh/k2h-c1-clean", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Avifenesh/k2h-c1-clean
- SGLang
How to use Avifenesh/k2h-c1-clean 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 "Avifenesh/k2h-c1-clean" \ --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": "Avifenesh/k2h-c1-clean", "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 "Avifenesh/k2h-c1-clean" \ --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": "Avifenesh/k2h-c1-clean", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Avifenesh/k2h-c1-clean with Docker Model Runner:
docker model run hf.co/Avifenesh/k2h-c1-clean
K2H c1-clean
Arm 1 of a continued-pretraining study on IFM/K2-Horizon-MoVA-36B-A4B: clean domain data plus unverified synthetic replay.
Research checkpoint, published 2026-11-03. It is not a release candidate. Compare it with the release, not in isolation.
Model
- Base: IFM/K2-Horizon-MoVA-36B-A4B (36B total, about 4B active, MoE). Same architecture, tokenizer and chat template.
- Weights: bf16 safetensors. The custom modeling code ships with the weights, so load with
trust_remote_code=True. - Sampling as the base model card recommends: temperature 1.0, top_p 0.95.
Training
- Trainer: xLLM, FSDP2, bf16, 3 GPUs.
- Start: the released weights of IFM/K2-Horizon-MoVA-36B-A4B.
- 100 steps. Sequence length 65,536, batch 1 per GPU, gradient accumulation 4: about 786k tokens per step, about 79M tokens in total.
- AdamW, beta1 0.9, beta2 0.95, weight decay 0.06, gradient clip 1.0.
- Learning rate 1.5e-5, 20 warmup steps, then constant.
- Chat records, where present, are trained on assistant tokens only.
Data mix (sampling weights):
- 44.5%: domain slices from Avifenesh/k2h-corpus-domain-clean (inference, framework, general and Linux code bundles, commits) plus pull-request text and a small slice of tuning notes that are not published.
- 55.5%: synthetic replay from IFM/Math-Reasoning, IFM/Code-Reasoning and IFM/SFT-Reasoning after quality rules but before script verification (not published; the verified part is in Avifenesh/k2h-replay-verified).
Evaluation
All numbers come from the same harness as the release column (lm-evaluation-harness against a vLLM server). IFEval and chat GSM8K use the chat template with reasoning on, temperature 1.0, top_p 0.95, 14,336 new tokens, and score only the text after the reasoning block. The PR NLL is the mean token NLL on 150 held-out pull requests (530k tokens).
| Task | Release | This model | Change |
|---|---|---|---|
| GSM8K, 5-shot, strict | 90.1 | 88.4 | -1.7 |
| GSM8K, chat zero-shot (reasoning on) | 96.6 | 95.8 | -0.8 |
| IFEval, prompt-strict (reasoning on) | 84.3 | 73.2 | -11.1 |
| MMLU | 77.3 | 76.5 | -0.8 |
| ARC-Challenge | 57.6 | 57.3 | -0.3 |
| ARC-Easy | 85.6 | 85.2 | -0.4 |
| BoolQ | 88.4 | 88.3 | -0.1 |
| HellaSwag (norm) | 67.6 | 67.4 | -0.2 |
| PIQA | 80.5 | 80.5 | +0.0 |
| WinoGrande | 69.1 | 69.6 | +0.5 |
| MBPP pass@1 | 65.2 | 71.6 | +6.4 |
| HumanEval pass@1 (4 samples) | 53.0 | 65.9 | +12.9 |
| Held-out PR NLL (lower is better) | 1.519 | 1.332 | -0.187 |
What the numbers say:
- Coding goes up (MBPP +6.4, HumanEval +12.9) and most general tasks stay level.
- Few-shot GSM8K drops 1.7 points (p=0.02, paired). Chat-format GSM8K is level (95.8 vs 96.6), so the few-shot gap is mostly format.
- IFEval drops 11.1 points (p=2e-8). The model often writes "think..." after closing its reasoning block. The unverified replay is the likely cause: the control arm with verified replay (k2h-c4-ctrl) keeps IFEval level.
License
Apache-2.0, the license of the base model.
- Downloads last month
- 348
Model tree for Avifenesh/k2h-c1-clean
Base model
IFM/K2-Horizon-MoVA-36B-A4B