Text Generation
Transformers
PyTorch
TensorBoard
English
kairos
diffusion
multimodal
Mixture of Experts
trust_remote_code
custom_code
Instructions to use ffurfaro/kairos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ffurfaro/kairos with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ffurfaro/kairos", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ffurfaro/kairos", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ffurfaro/kairos with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ffurfaro/kairos" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ffurfaro/kairos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ffurfaro/kairos
- SGLang
How to use ffurfaro/kairos 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 "ffurfaro/kairos" \ --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": "ffurfaro/kairos", "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 "ffurfaro/kairos" \ --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": "ffurfaro/kairos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ffurfaro/kairos with Docker Model Runner:
docker model run hf.co/ffurfaro/kairos
| language: en | |
| license: apache-2.0 | |
| library_name: transformers | |
| tags: | |
| - kairos | |
| - diffusion | |
| - multimodal | |
| - moe | |
| - trust_remote_code | |
| pipeline_tag: text-generation | |
| datasets: | |
| - ffurfaro/keep-it-simple | |
| - ffurfaro/keep-it-simple-multimodal | |
| <h1 align="center"><p>π kairos</p></h1> | |
| <p align="center"> | |
| <a href="https://github.com/fabienfrfr/Kairos"> | |
| <img alt="GitHub" src="https://img.shields.io/badge/github-fabienfrfr%2FKairos-black?logo=github"> | |
| </a> | |
| <a href="https://huggingface.co/ffurfaro"> | |
| <img alt="Hugging Face" src="https://img.shields.io/badge/HuggingFace-model-yellow?logo=huggingface"> | |
| </a> | |
| </p> | |
| <h3 align="center"><p>KairosFM β less parameters, more signal.</p></h3> | |
| KairosFM is a hybrid MoE diffusion language model combining **DeltaNet** (linear attention), | |
| **Sliding Window Attention**, and **Attention Residuals (AttnRes)**, trained on text, image, | |
| video, audio, lidar, and control (state/action) modalities through a shared multimodal | |
| conv-byte tokenizer. See [github.com/fabienfrfr/Kairos](https://github.com/fabienfrfr/Kairos) | |
| for the full architecture writeup. | |
| ## This checkpoint | |
| | | | | |
| |---|---| | |
| | Total params | ?-dim, ? layers | | |
| | Experts | 7 routed / 1 shared, top-1 | | |
| | Vocab size | 291 | | |
| | Best training loss | `7.30881994911411` | | |
| | Steps trained | `4533` | | |
| Note: this repo currently tracks best-training-loss only (`checkpoints/best.pt`) β no held-out | |
| validation split is evaluated during training yet. | |
| ## Files | |
| - `checkpoints/` β `best.pt` (lowest avg training loss) + periodic `step_*.pt` | |
| - `tensorboard/` β `events.out.tfevents.*`, viewable in the Hub's **Training Metrics** tab | |
| - `config.json`, `model.safetensors` β native HF format, loadable via `trust_remote_code` | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM | |
| model = AutoModelForCausalLM.from_pretrained("ffurfaro/kairos", trust_remote_code=True) | |
| ``` | |
| Requires the `kairos` package importable (custom architecture, not upstream `transformers`) β | |
| install from [github.com/fabienfrfr/Kairos](https://github.com/fabienfrfr/Kairos) first, or add | |
| it to `PYTHONPATH`. Alternatively, skip `Auto*` and import the class directly: | |
| ```python | |
| from kairos.modeling import KairosDiffusionLLM | |
| model = KairosDiffusionLLM.from_pretrained("ffurfaro/kairos") | |
| ``` | |
| ## Limitations | |
| Experimental, low-compute-budget training run β expect uneven quality across modalities | |
| (multimodal data is a small fraction of total training). Not evaluated for safety-critical use. | |
| ## Citation | |
| ```bibtex | |
| @misc{kairos, | |
| title = {KairosFM: less parameters, more signal β a multimodal MoE diffusion model for edge AI}, | |
| author = {Fabien Furfaro}, | |
| url = {https://github.com/fabienfrfr/Kairos} | |
| } | |
| ``` | |