Instructions to use maxdemarzi/black-swan-sft15-q4 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 maxdemarzi/black-swan-sft15-q4 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 maxdemarzi/black-swan-sft15-q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf maxdemarzi/black-swan-sft15-q4:Q4_K_M
Use Docker
docker model run hf.co/maxdemarzi/black-swan-sft15-q4:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use maxdemarzi/black-swan-sft15-q4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maxdemarzi/black-swan-sft15-q4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maxdemarzi/black-swan-sft15-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/maxdemarzi/black-swan-sft15-q4:Q4_K_M
- Ollama
How to use maxdemarzi/black-swan-sft15-q4 with Ollama:
ollama run hf.co/maxdemarzi/black-swan-sft15-q4:Q4_K_M
- Unsloth Studio
How to use maxdemarzi/black-swan-sft15-q4 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for maxdemarzi/black-swan-sft15-q4 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for maxdemarzi/black-swan-sft15-q4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for maxdemarzi/black-swan-sft15-q4 to start chatting
- Docker Model Runner
How to use maxdemarzi/black-swan-sft15-q4 with Docker Model Runner:
docker model run hf.co/maxdemarzi/black-swan-sft15-q4:Q4_K_M
- Lemonade
How to use maxdemarzi/black-swan-sft15-q4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull maxdemarzi/black-swan-sft15-q4:Q4_K_M
Run and chat with the model
lemonade run user.black-swan-sft15-q4-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Run and chat with the model
lemonade run user.black-swan-sft15-q4-Q4_K_MList all available models
lemonade listblack-swan-sft15 β PyRel generator (q4_K_M)
Qwen2.5-Coder-1.5B-Instruct with black_swan's sft15-spider-bird-v5 LoRA merged
in, quantized to q4_K_M. It writes PyRel
β a declarative Python query DSL β from a natural-language question and a schema.
Built for Event Horizon, which runs Swan, PyRel and DuckDB as WebAssembly in the browser and needs generation from somewhere. 986 MB, against 3.1 GB for the f16 it was quantized from.
Serve it with greedy decoding, or it gets measurably worse
This is the one thing to get right. The adapter was trained and evaluated under
plain greedy decoding, and several servers apply a repetition penalty and top-k
sampling even at temperature 0. On TPC-DS questions that mismatch measured
as one wrong answer in five, and it reads as the model being weak rather than as
a serving setting:
| correct | |
|---|---|
ollama defaults, temperature 0 |
3/5 |
top_k 1, top_p 1.0, repeat_penalty 1.0 |
4/5 |
Prompt shape
It expects its own system prompt and a Schema: / Question: user turn. Both
are in
tools/local_generator.py
(SYSTEM_V5, build_user_turn), asserted byte-identical against the training
split by tools/verify_local_generator.py. Sending a differently-worded system
prompt is off-distribution and costs accuracy quietly.
Schemas are rendered as Concept: prop, prop lines with foreign keys as
Child.member -> Parent.
Scores
Executed rather than string-matched β every prediction is run and its result compared with a verified reference, because PyRel has several correct spellings of most questions.
| f16 | this (q4_K_M) | |
|---|---|---|
| Spider, 217 held-out | 81.6% | 77.4% |
| BIRD, 428 held-out | 10.0% | 9.6% |
| TPC-DS, 22 questions | 59.1% | 45.5% |
Quantization costs more on large schemas. ~5% relative on Spider and BIRD, whose schemas run 391β1,455 characters, but 23% on TPC-DS at 31,208 characters. If your schema is wide, weigh the 986 MB against that rather than against the small-schema numbers.
Its weakest tier is joins on wide schemas: the traversal syntax is usually right
and the property names are invented (sold_price for price). Feeding swan's
own error back β "has no property X, did you mean Y" β does not repair it, so
it is a grounding limitation rather than a prompting one.
Related
black-swan-sft15β training- Event Horizon β the application
- Swan β PyRel and the DuckDB extension
- Downloads last month
- -
4-bit
Model tree for maxdemarzi/black-swan-sft15-q4
Base model
Qwen/Qwen2.5-1.5B
Pull the model
# Download Lemonade from https://lemonade-server.ai/