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
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- kairos
|
| 7 |
+
- diffusion
|
| 8 |
+
- multimodal
|
| 9 |
+
- moe
|
| 10 |
+
- trust_remote_code
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
datasets:
|
| 13 |
+
- ffurfaro/keep-it-simple
|
| 14 |
+
- ffurfaro/keep-it-simple-multimodal
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
<h1 align="center"><p>π kairos</p></h1>
|
| 18 |
+
|
| 19 |
+
<p align="center">
|
| 20 |
+
<a href="https://github.com/fabienfrfr/Kairos">
|
| 21 |
+
<img alt="GitHub" src="https://img.shields.io/badge/github-fabienfrfr%2FKairos-black?logo=github">
|
| 22 |
+
</a>
|
| 23 |
+
<a href="https://huggingface.co/ffurfaro">
|
| 24 |
+
<img alt="Hugging Face" src="https://img.shields.io/badge/HuggingFace-model-yellow?logo=huggingface">
|
| 25 |
+
</a>
|
| 26 |
+
</p>
|
| 27 |
+
|
| 28 |
+
<h3 align="center"><p>KairosFM β less parameters, more signal.</p></h3>
|
| 29 |
+
|
| 30 |
+
KairosFM is a hybrid MoE diffusion language model combining **DeltaNet** (linear attention),
|
| 31 |
+
**Sliding Window Attention**, and **Attention Residuals (AttnRes)**, trained on text, image,
|
| 32 |
+
video, audio, lidar, and control (state/action) modalities through a shared multimodal
|
| 33 |
+
conv-byte tokenizer. See [github.com/fabienfrfr/Kairos](https://github.com/fabienfrfr/Kairos)
|
| 34 |
+
for the full architecture writeup.
|
| 35 |
+
|
| 36 |
+
## This checkpoint
|
| 37 |
+
|
| 38 |
+
| | |
|
| 39 |
+
|---|---|
|
| 40 |
+
| Total params | ?-dim, ? layers |
|
| 41 |
+
| Experts | 7 routed / 1 shared, top-1 |
|
| 42 |
+
| Vocab size | 291 |
|
| 43 |
+
| Best training loss | `7.30881994911411` |
|
| 44 |
+
| Steps trained | `4533` |
|
| 45 |
+
|
| 46 |
+
Note: this repo currently tracks best-training-loss only (`checkpoints/best.pt`) β no held-out
|
| 47 |
+
validation split is evaluated during training yet.
|
| 48 |
+
|
| 49 |
+
## Files
|
| 50 |
+
|
| 51 |
+
- `checkpoints/` β `best.pt` (lowest avg training loss) + periodic `step_*.pt`
|
| 52 |
+
- `tensorboard/` β `events.out.tfevents.*`, viewable in the Hub's **Training Metrics** tab
|
| 53 |
+
- `config.json`, `model.safetensors` β native HF format, loadable via `trust_remote_code`
|
| 54 |
+
|
| 55 |
+
## Usage
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from transformers import AutoModelForCausalLM
|
| 59 |
+
|
| 60 |
+
model = AutoModelForCausalLM.from_pretrained("ffurfaro/kairos", trust_remote_code=True)
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
Requires the `kairos` package importable (custom architecture, not upstream `transformers`) β
|
| 64 |
+
install from [github.com/fabienfrfr/Kairos](https://github.com/fabienfrfr/Kairos) first, or add
|
| 65 |
+
it to `PYTHONPATH`. Alternatively, skip `Auto*` and import the class directly:
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
from kairos.modeling import KairosDiffusionLLM
|
| 69 |
+
|
| 70 |
+
model = KairosDiffusionLLM.from_pretrained("ffurfaro/kairos")
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## Limitations
|
| 74 |
+
|
| 75 |
+
Experimental, low-compute-budget training run β expect uneven quality across modalities
|
| 76 |
+
(multimodal data is a small fraction of total training). Not evaluated for safety-critical use.
|
| 77 |
+
|
| 78 |
+
## Citation
|
| 79 |
+
|
| 80 |
+
```bibtex
|
| 81 |
+
@misc{kairos,
|
| 82 |
+
title = {KairosFM: less parameters, more signal β a multimodal MoE diffusion model for edge AI},
|
| 83 |
+
author = {Fabien Furfaro},
|
| 84 |
+
url = {https://github.com/fabienfrfr/Kairos}
|
| 85 |
+
}
|
| 86 |
+
```
|