Instructions to use Tyesee/ZuperAI-14B 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 Tyesee/ZuperAI-14B 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 Tyesee/ZuperAI-14B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tyesee/ZuperAI-14B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Tyesee/ZuperAI-14B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tyesee/ZuperAI-14B: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 Tyesee/ZuperAI-14B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Tyesee/ZuperAI-14B:Q4_K_M
Use Docker
docker model run hf.co/Tyesee/ZuperAI-14B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Tyesee/ZuperAI-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tyesee/ZuperAI-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tyesee/ZuperAI-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tyesee/ZuperAI-14B:Q4_K_M
- Ollama
How to use Tyesee/ZuperAI-14B with Ollama:
ollama run hf.co/Tyesee/ZuperAI-14B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Tyesee/ZuperAI-14B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Tyesee/ZuperAI-14B: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Tyesee/ZuperAI-14B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Tyesee/ZuperAI-14B with Docker Model Runner:
docker model run hf.co/Tyesee/ZuperAI-14B:Q4_K_M
- Lemonade
How to use Tyesee/ZuperAI-14B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tyesee/ZuperAI-14B:Q4_K_M
Run and chat with the model
lemonade run user.ZuperAI-14B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Tyesee/ZuperAI-14B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Tyesee/ZuperAI-14B: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:9931/v1 hermes config set model.default Tyesee/ZuperAI-14B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Tyesee/ZuperAI-14B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Tyesee/ZuperAI-14B: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:9931/v1 \ --custom-model-id "Tyesee/ZuperAI-14B: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"
toolkit: bench_speed.py
Browse files- toolkit/bench_speed.py +54 -0
toolkit/bench_speed.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""Замер скорости генерации (токенов/сек) для ZuperAI на GPU."""
|
| 3 |
+
import time
|
| 4 |
+
|
| 5 |
+
import torch
|
| 6 |
+
from peft import PeftModel
|
| 7 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 8 |
+
|
| 9 |
+
BASE = "Qwen/Qwen2.5-Coder-3B-Instruct"
|
| 10 |
+
LORA = "ZuperAI-12.5.0.2"
|
| 11 |
+
SYSTEM = ("Ты — опытный программист. Отвечай только рабочим, лаконичным кодом "
|
| 12 |
+
"без лишних пояснений. Комментарии и докстринги пиши на русском.")
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def main():
|
| 16 |
+
tok = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
|
| 17 |
+
model = AutoModelForCausalLM.from_pretrained(BASE, dtype=torch.bfloat16,
|
| 18 |
+
trust_remote_code=True).to("cuda")
|
| 19 |
+
model = PeftModel.from_pretrained(model, LORA)
|
| 20 |
+
model.eval()
|
| 21 |
+
|
| 22 |
+
print("GPU:", torch.cuda.get_device_name(0))
|
| 23 |
+
|
| 24 |
+
prompt = ("Напиши на Python класс UserRepository поверх SQLite: подключение, "
|
| 25 |
+
"создание таблицы users, методы create, get_by_id, update, delete, "
|
| 26 |
+
"list с пагинацией и поиск по имени. С русскими докстрингами.")
|
| 27 |
+
ms = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": prompt}]
|
| 28 |
+
enc = tok.apply_chat_template(ms, tokenize=True, add_generation_prompt=True,
|
| 29 |
+
return_tensors="pt")
|
| 30 |
+
ids = enc["input_ids"].to("cuda")
|
| 31 |
+
|
| 32 |
+
# прогрев (компиляция CUDA-кернелов)
|
| 33 |
+
with torch.no_grad():
|
| 34 |
+
model.generate(ids, max_new_tokens=32, do_sample=False)
|
| 35 |
+
|
| 36 |
+
# форсируем полную длину (без ранней остановки по EOS) — чистый замер скорости
|
| 37 |
+
old_eos = model.generation_config.eos_token_id
|
| 38 |
+
model.generation_config.eos_token_id = -1
|
| 39 |
+
|
| 40 |
+
for N in (256, 512):
|
| 41 |
+
torch.cuda.synchronize()
|
| 42 |
+
t0 = time.time()
|
| 43 |
+
with torch.no_grad():
|
| 44 |
+
out = model.generate(ids, max_new_tokens=N, do_sample=False)
|
| 45 |
+
torch.cuda.synchronize()
|
| 46 |
+
dt = time.time() - t0
|
| 47 |
+
gen = out.shape[1] - ids.shape[1]
|
| 48 |
+
print(f"max_new_tokens={N:4d} -> {gen:4d} токенов за {dt:5.2f}с = {gen / dt:6.1f} ток/сек")
|
| 49 |
+
|
| 50 |
+
model.generation_config.eos_token_id = old_eos
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
if __name__ == "__main__":
|
| 54 |
+
main()
|