Instructions to use mechramc/kalavai-phase1-410m-science-specialist-seed42 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mechramc/kalavai-phase1-410m-science-specialist-seed42 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mechramc/kalavai-phase1-410m-science-specialist-seed42")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mechramc/kalavai-phase1-410m-science-specialist-seed42") model = AutoModelForMultimodalLM.from_pretrained("mechramc/kalavai-phase1-410m-science-specialist-seed42") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mechramc/kalavai-phase1-410m-science-specialist-seed42 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mechramc/kalavai-phase1-410m-science-specialist-seed42" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mechramc/kalavai-phase1-410m-science-specialist-seed42", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mechramc/kalavai-phase1-410m-science-specialist-seed42
- SGLang
How to use mechramc/kalavai-phase1-410m-science-specialist-seed42 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 "mechramc/kalavai-phase1-410m-science-specialist-seed42" \ --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": "mechramc/kalavai-phase1-410m-science-specialist-seed42", "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 "mechramc/kalavai-phase1-410m-science-specialist-seed42" \ --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": "mechramc/kalavai-phase1-410m-science-specialist-seed42", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mechramc/kalavai-phase1-410m-science-specialist-seed42 with Docker Model Runner:
docker model run hf.co/mechramc/kalavai-phase1-410m-science-specialist-seed42
KALAVAI — Science Specialist (pythia-410m, seed 42)
Fine-tuned EleutherAI/pythia-410m on Science data as part of the KALAVAI decentralized cooperative training protocol.
- Paper: KALAVAI: Predicting When Independent Specialist Fusion Works -- A Quantitative Model for Post-Hoc Cooperative LLM Training
- GitHub: mechramc/Kalavai
Paper results
Phase 1 English domains. MoE fusion: +7.72% ±0.02pp over best specialist (3 seeds). Mean divergence 15.65%.
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("mechramc/kalavai-phase1-410m-science-specialist-seed42")
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-410m")
This model is one specialist in a KALAVAI cooperative. To reproduce the MoE fusion results from the paper, load multiple domain specialists and combine them with a trained MoE router (see the paper and GitHub for details).
Citation
@article{kumaresan2026kalavai,
title = {{KALAVAI}: Predicting When Independent Specialist Fusion Works
--- A Quantitative Model for Post-Hoc Cooperative {LLM} Training},
author = {Kumaresan, Ramchand},
journal = {arXiv preprint arXiv:2603.22755},
year = {2026},
url = {https://arxiv.org/abs/2603.22755}
}
- Downloads last month
- 3
Model tree for mechramc/kalavai-phase1-410m-science-specialist-seed42
Base model
EleutherAI/pythia-410m