Kimi-K3-Abliterated
Collection
1 item • Updated • 1
How to use Uniboshi/Kimi-K3-Abliterated-V1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="Uniboshi/Kimi-K3-Abliterated-V1", trust_remote_code=True)
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 AutoModel
model = AutoModel.from_pretrained("Uniboshi/Kimi-K3-Abliterated-V1", trust_remote_code=True, device_map="auto")How to use Uniboshi/Kimi-K3-Abliterated-V1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Uniboshi/Kimi-K3-Abliterated-V1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Uniboshi/Kimi-K3-Abliterated-V1",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'docker model run hf.co/Uniboshi/Kimi-K3-Abliterated-V1
How to use Uniboshi/Kimi-K3-Abliterated-V1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Uniboshi/Kimi-K3-Abliterated-V1" \
--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": "Uniboshi/Kimi-K3-Abliterated-V1",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'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 "Uniboshi/Kimi-K3-Abliterated-V1" \
--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": "Uniboshi/Kimi-K3-Abliterated-V1",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'How to use Uniboshi/Kimi-K3-Abliterated-V1 with Docker Model Runner:
docker model run hf.co/Uniboshi/Kimi-K3-Abliterated-V1
writer written as n before after removed
*.2 [0] as stored 1 0.980..0.980 1.53e-02..1.53e-02 98.44%
*.down_proj [0] as stored 93 0.932..1.421 1.35e-02..1.56e-02 98.62%
*.embed_tokens [1] as stored 1 1.040..1.040 1.46e-02..1.46e-02 98.60%
*.o_proj [0] as stored 93 0.938..1.358 1.38e-02..1.60e-02 98.54%
*.routed_expert_up_proj [0] as stored 92 0.910..1.402 1.24e-02..1.56e-02 98.57%
Base model
moonshotai/Kimi-K3