Instructions to use melonTraining/kairos2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use melonTraining/kairos2 with PEFT:
Task type is invalid.
- Transformers
How to use melonTraining/kairos2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="melonTraining/kairos2") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("melonTraining/kairos2") model = AutoModelForMultimodalLM.from_pretrained("melonTraining/kairos2", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use melonTraining/kairos2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "melonTraining/kairos2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "melonTraining/kairos2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/melonTraining/kairos2
- SGLang
How to use melonTraining/kairos2 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 "melonTraining/kairos2" \ --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": "melonTraining/kairos2", "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 "melonTraining/kairos2" \ --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": "melonTraining/kairos2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use melonTraining/kairos2 with Docker Model Runner:
docker model run hf.co/melonTraining/kairos2
Add files using upload-large-folder tool
Browse files- .gitattributes +0 -1
- model-00001-of-00013.safetensors +1 -1
- model-00002-of-00013.safetensors +1 -1
- model-00003-of-00013.safetensors +1 -1
- model-00004-of-00013.safetensors +1 -1
- model-00005-of-00013.safetensors +1 -1
- model-00006-of-00013.safetensors +1 -1
- model-00007-of-00013.safetensors +1 -1
- model-00008-of-00013.safetensors +1 -1
- model-00009-of-00013.safetensors +1 -1
- model-00010-of-00013.safetensors +1 -1
- model-00011-of-00013.safetensors +1 -1
- model-00012-of-00013.safetensors +1 -1
- model-00013-of-00013.safetensors +1 -1
- pytorch_model_fsdp.bin +1 -1
.gitattributes
CHANGED
|
@@ -14,4 +14,3 @@ model-00007-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
| 14 |
model-00009-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 15 |
model-00012-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 16 |
model-00010-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
training_args.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 14 |
model-00009-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 15 |
model-00012-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 16 |
model-00010-of-00013.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
|
model-00001-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5209232190
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd27661ffd858e5a92a86b0ab249fb9524701c31ea93676f9a9c1abc7b448a1f
|
| 3 |
size 5209232190
|
model-00002-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5130912714
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a491dc010fffd26ad5414d09659707a217a3761c42af27d41ac38e79f52f0372
|
| 3 |
size 5130912714
|
model-00003-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5031855666
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31e890005a01fab6104227d02c3b479e7e3e41bdada4fdac7b918aa07a339830
|
| 3 |
size 5031855666
|
model-00004-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5031823034
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8163d4dd61e65a73f3540833c070cccdd3e896acd98570e38594e88d8c5d9f3b
|
| 3 |
size 5031823034
|
model-00005-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5130923684
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c88de6a6ab160001f37fc921428751e33f8ee8756bd796e453554c9441dd98b
|
| 3 |
size 5130923684
|
model-00006-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5020811330
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44408e424a7ee4dfad87000184f269d4dc4ca4d6cdad0909981ddf494c7ad06b
|
| 3 |
size 5020811330
|
model-00007-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5130912714
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc7f9590f7ce51e719edde431e7e8686241370eb8e81a88bed1ba2dba9e5c144
|
| 3 |
size 5130912714
|
model-00008-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5031855666
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dffec7270e7693c2c5c9507676460ebfa24fb7b892a1b27b78c635ef17840ee8
|
| 3 |
size 5031855666
|
model-00009-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5020823580
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43b5006aa01cd89bfee47b98ef795559b21a055067b98dc8f0faad786d22aa9a
|
| 3 |
size 5020823580
|
model-00010-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5141923098
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d7de0386f2028aa9fa61bfdf54cd9ba5d16191a30e21d21f9e8187671a8d0c6
|
| 3 |
size 5141923098
|
model-00011-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5130912714
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7dda0ae28e3dbe589d64c881befd0b9d78d7f24641ce6ae1c72ce4d4d3bf2998
|
| 3 |
size 5130912714
|
model-00012-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5020811338
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0ff5b9be980f54146c8fe776ef815095929c5feb91643bb06a70730293402be
|
| 3 |
size 5020811338
|
model-00013-of-00013.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1513538152
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56f6380c76a33f76cef496a75c3ed1676ea30e4a6aa7c11da64013d9d9f3a20c
|
| 3 |
size 1513538152
|
pytorch_model_fsdp.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1959190293
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:751b36174559a30e833a4cf4bcb38bc760aaaea9d143608230c25c58d812c183
|
| 3 |
size 1959190293
|