Instructions to use tiny-random/kimi-k3.1-pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/kimi-k3.1-pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tiny-random/kimi-k3.1-pro", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("tiny-random/kimi-k3.1-pro", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/kimi-k3.1-pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/kimi-k3.1-pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/kimi-k3.1-pro", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiny-random/kimi-k3.1-pro
- SGLang
How to use tiny-random/kimi-k3.1-pro 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 "tiny-random/kimi-k3.1-pro" \ --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": "tiny-random/kimi-k3.1-pro", "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 "tiny-random/kimi-k3.1-pro" \ --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": "tiny-random/kimi-k3.1-pro", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiny-random/kimi-k3.1-pro with Docker Model Runner:
docker model run hf.co/tiny-random/kimi-k3.1-pro
Upload folder using huggingface_hub
Browse files- .meta/create_model.py +1 -1
- model.safetensors +2 -2
.meta/create_model.py
CHANGED
|
@@ -350,5 +350,5 @@ def create_model(source_model_id: str, source_revision: str, save_folder: str) -
|
|
| 350 |
create_model(
|
| 351 |
source_model_id="moonshotai/Kimi-K3.1-Pro",
|
| 352 |
source_revision="d9e99b0792a5e93b78ea9bea62a68167e36ddd9e",
|
| 353 |
-
save_folder="/tmp/kimi-
|
| 354 |
)
|
|
|
|
| 350 |
create_model(
|
| 351 |
source_model_id="moonshotai/Kimi-K3.1-Pro",
|
| 352 |
source_revision="d9e99b0792a5e93b78ea9bea62a68167e36ddd9e",
|
| 353 |
+
save_folder="/tmp/kimi-k3.1-pro",
|
| 354 |
)
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac374bbdaa96d2f421c37acfeaeefb029ae9acee6f9b2a3bbbc0ebddbc8c428f
|
| 3 |
+
size 35577384
|