Text Generation
GGUF
sixpert
self-improving
self-scaffolding
reinforcement-learning
ornith
GRPO
conversational
reasoning
uncensored
multimodal
vision
function-calling
agentic
long-context
trading
finance
coding
open-source
imatrix
Instructions to use SixpertAI/SixpertK1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SixpertAI/SixpertK1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf SixpertAI/SixpertK1:Q4_K_M # Run inference directly in the terminal: llama cli -hf SixpertAI/SixpertK1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SixpertAI/SixpertK1:Q4_K_M # Run inference directly in the terminal: llama cli -hf SixpertAI/SixpertK1:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf SixpertAI/SixpertK1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf SixpertAI/SixpertK1:Q4_K_M
Use Docker
docker model run hf.co/SixpertAI/SixpertK1:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use SixpertAI/SixpertK1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SixpertAI/SixpertK1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SixpertAI/SixpertK1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SixpertAI/SixpertK1:Q4_K_M
- Ollama
How to use SixpertAI/SixpertK1 with Ollama:
ollama run hf.co/SixpertAI/SixpertK1:Q4_K_M
- Unsloth Desktop
- Pi
How to use SixpertAI/SixpertK1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK1:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SixpertAI/SixpertK1:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SixpertAI/SixpertK1 with Docker Model Runner:
docker model run hf.co/SixpertAI/SixpertK1:Q4_K_M
- Lemonade
How to use SixpertAI/SixpertK1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SixpertAI/SixpertK1:Q4_K_M
Run and chat with the model
lemonade run user.SixpertK1-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SixpertAI/SixpertK1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK1:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SixpertAI/SixpertK1:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SixpertAI/SixpertK1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK1:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "SixpertAI/SixpertK1:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload examples/vision_example.py with huggingface_hub
Browse files- examples/vision_example.py +111 -0
examples/vision_example.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
Sixpert K1 - Vision/Multimodal Example
|
| 4 |
+
=======================================
|
| 5 |
+
Demonstrates how to use Sixpert K1's vision capabilities with
|
| 6 |
+
image inputs using llama-cpp-python.
|
| 7 |
+
|
| 8 |
+
Usage:
|
| 9 |
+
python vision_example.py --image ./photo.jpg --prompt "Describe this image in detail"
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import base64
|
| 14 |
+
import sys
|
| 15 |
+
|
| 16 |
+
try:
|
| 17 |
+
from llama_cpp import Llama
|
| 18 |
+
except ImportError:
|
| 19 |
+
print("Installing llama-cpp-python...")
|
| 20 |
+
import subprocess
|
| 21 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "llama-cpp-python"])
|
| 22 |
+
from llama_cpp import Llama
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def image_to_base64(image_path: str) -> str:
|
| 26 |
+
"""Convert an image file to base64 data URL."""
|
| 27 |
+
with open(image_path, "rb") as f:
|
| 28 |
+
data = base64.b64encode(f.read()).decode("utf-8")
|
| 29 |
+
|
| 30 |
+
# Detect MIME type from file extension
|
| 31 |
+
if image_path.lower().endswith(".png"):
|
| 32 |
+
mime = "image/png"
|
| 33 |
+
elif image_path.lower().endswith(".jpg") or image_path.lower().endswith(".jpeg"):
|
| 34 |
+
mime = "image/jpeg"
|
| 35 |
+
elif image_path.lower().endswith(".webp"):
|
| 36 |
+
mime = "image/webp"
|
| 37 |
+
elif image_path.lower().endswith(".gif"):
|
| 38 |
+
mime = "image/gif"
|
| 39 |
+
else:
|
| 40 |
+
mime = "image/png"
|
| 41 |
+
|
| 42 |
+
return f"data:{mime};base64,{data}"
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def analyze_image(
|
| 46 |
+
model_path: str,
|
| 47 |
+
image_path: str,
|
| 48 |
+
prompt: str,
|
| 49 |
+
max_tokens: int = 2048,
|
| 50 |
+
):
|
| 51 |
+
"""Analyze an image using Sixpert K1."""
|
| 52 |
+
print(f"Loading Sixpert K1...")
|
| 53 |
+
llm = Llama(
|
| 54 |
+
model_path=model_path,
|
| 55 |
+
n_ctx=131072,
|
| 56 |
+
n_gpu_layers=-1,
|
| 57 |
+
verbose=False,
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
image_data = image_to_base64(image_path)
|
| 61 |
+
|
| 62 |
+
messages = [
|
| 63 |
+
{
|
| 64 |
+
"role": "user",
|
| 65 |
+
"content": [
|
| 66 |
+
{
|
| 67 |
+
"type": "text",
|
| 68 |
+
"text": prompt,
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "image_url",
|
| 72 |
+
"image_url": {"url": image_data},
|
| 73 |
+
},
|
| 74 |
+
],
|
| 75 |
+
},
|
| 76 |
+
]
|
| 77 |
+
|
| 78 |
+
print(f"\nPrompt: {prompt}")
|
| 79 |
+
print(f"Image: {image_path}")
|
| 80 |
+
print("-" * 40)
|
| 81 |
+
print("Analyzing image...")
|
| 82 |
+
print("-" * 40)
|
| 83 |
+
|
| 84 |
+
response = llm.create_chat_completion(
|
| 85 |
+
messages=messages,
|
| 86 |
+
max_tokens=max_tokens,
|
| 87 |
+
temperature=0.7,
|
| 88 |
+
stream=True,
|
| 89 |
+
)
|
| 90 |
+
|
| 91 |
+
for chunk in response:
|
| 92 |
+
delta = chunk["choices"][0]["delta"].get("content", "")
|
| 93 |
+
if delta:
|
| 94 |
+
print(delta, end="", flush=True)
|
| 95 |
+
|
| 96 |
+
print("\n")
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
def main():
|
| 100 |
+
parser = argparse.ArgumentParser(description="Sixpert K1 Vision Example")
|
| 101 |
+
parser.add_argument("--model", type=str, default="SixpertK1.gguf", help="Path to GGUF model")
|
| 102 |
+
parser.add_argument("--image", type=str, required=True, help="Path to input image")
|
| 103 |
+
parser.add_argument("--prompt", type=str, default="Describe this image in detail.", help="Prompt")
|
| 104 |
+
parser.add_argument("--max-tokens", type=int, default=2048, help="Max tokens")
|
| 105 |
+
|
| 106 |
+
args = parser.parse_args()
|
| 107 |
+
analyze_image(args.model, args.image, args.prompt, args.max_tokens)
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
if __name__ == "__main__":
|
| 111 |
+
main()
|