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
| { | |
| "model_config": { | |
| "transformers_version": "5.15.0", | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "_name_or_path": "", | |
| "num_modalities": 8, | |
| "num_scales": 4, | |
| "modality_scales": { | |
| "0": [ | |
| 0, | |
| 1 | |
| ], | |
| "5": [ | |
| 0 | |
| ], | |
| "6": [ | |
| 0 | |
| ], | |
| "1": [ | |
| 1, | |
| 2 | |
| ], | |
| "4": [ | |
| 1 | |
| ], | |
| "3": [ | |
| 2 | |
| ], | |
| "2": [ | |
| 2, | |
| 3 | |
| ], | |
| "7": [ | |
| 3 | |
| ] | |
| }, | |
| "moe_intermediate_size": 544, | |
| "num_local_experts": 7, | |
| "num_experts_per_tok": 1, | |
| "n_shared_experts": 1, | |
| "use_moe": true, | |
| "attnres_block_size": 4, | |
| "use_memory_gate": true, | |
| "hidden_size": 64, | |
| "num_attention_heads": 4, | |
| "num_hidden_layers": 4, | |
| "vocab_size": 291, | |
| "text_modality_id": 0, | |
| "stride": 3, | |
| "sliding_window_size": 128, | |
| "num_key_value_heads": 4, | |
| "head_dim": 16, | |
| "attention_dropout": 0.0, | |
| "rope_theta": 10000.0, | |
| "max_position_embeddings": 4096, | |
| "linear_num_value_heads": 4, | |
| "linear_num_key_heads": 4, | |
| "linear_key_head_dim": 16, | |
| "linear_value_head_dim": 16, | |
| "linear_conv_kernel_dim": 4, | |
| "hidden_act": "silu", | |
| "rms_norm_eps": 1e-06, | |
| "time_step_min": 0.001, | |
| "time_step_max": 0.1, | |
| "time_step_floor": 0.0001, | |
| "A_init_range": [ | |
| 1.0, | |
| 16.0 | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 544, | |
| "routed_scaling_factor": 1.0, | |
| "n_group": 1, | |
| "topk_group": 1, | |
| "norm_topk_prob": false, | |
| "layers_config": [ | |
| "ld", | |
| "ld", | |
| "ld", | |
| "ld" | |
| ], | |
| "slw_wsize": -1, | |
| "use_cache": false, | |
| "auto_map": { | |
| "AutoConfig": "modeling.KairosConfig" | |
| }, | |
| "model_type": "kairos", | |
| "output_attentions": false | |
| }, | |
| "train_config": { | |
| "lr": 0.0003, | |
| "epochs": 3, | |
| "save_every": 200, | |
| "last_ckpt_every": 20, | |
| "grad_clip": 1.0, | |
| "max_consecutive_nan": 50, | |
| "run_dir": "checkpoints/kairos-multimodal/run_01", | |
| "device": null, | |
| "report_to": [], | |
| "hub_repo_id": null, | |
| "hub_push_every_ckpt": false, | |
| "hub_private": false, | |
| "hub_subfolder": null | |
| }, | |
| "data_config": { | |
| "multimodal_examples": "<17235 examples, omitted>", | |
| "multimodal_path": null, | |
| "text_examples": "<0 examples, omitted>", | |
| "max_len": 1024, | |
| "stride": 3, | |
| "batch_size": 32, | |
| "shuffle": true, | |
| "drop_last": true, | |
| "pack": true | |
| } | |
| } |