Instructions to use maxdemarzi/black-swan-v6len-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-v6len-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-v6len-q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxdemarzi/black-swan-v6len-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-v6len-q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxdemarzi/black-swan-v6len-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-v6len-q4:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf maxdemarzi/black-swan-v6len-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-v6len-q4:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf maxdemarzi/black-swan-v6len-q4:Q4_K_M
Use Docker
docker model run hf.co/maxdemarzi/black-swan-v6len-q4:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use maxdemarzi/black-swan-v6len-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-v6len-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-v6len-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/maxdemarzi/black-swan-v6len-q4:Q4_K_M
- Ollama
How to use maxdemarzi/black-swan-v6len-q4 with Ollama:
ollama run hf.co/maxdemarzi/black-swan-v6len-q4:Q4_K_M
- Unsloth Studio
How to use maxdemarzi/black-swan-v6len-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-v6len-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-v6len-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-v6len-q4 to start chatting
- Docker Model Runner
How to use maxdemarzi/black-swan-v6len-q4 with Docker Model Runner:
docker model run hf.co/maxdemarzi/black-swan-v6len-q4:Q4_K_M
- Lemonade
How to use maxdemarzi/black-swan-v6len-q4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull maxdemarzi/black-swan-v6len-q4:Q4_K_M
Run and chat with the model
lemonade run user.black-swan-v6len-q4-Q4_K_M
List all available models
lemonade list
- Atomic Chat
| FROM ./merged_v6len | |
| # The TRAINED system prompt. Given a different one the same weights answer in SQL rather | |
| # than PyRel -- docs/OLLAMA.md records that as a measured failure, not a caution. | |
| SYSTEM """You write PyRel, a declarative Python query DSL. You are given a question and a schema of Concepts and their properties. Reply with only the PyRel program. | |
| Rules: | |
| - Never write an import. Every name you need is already defined, including `where`, `select`, `distinct`, `count`, `sum`, `avg`, `min`, `max`, `per`, `top`, `bottom`, `asc`, `desc`, `except_`, `intersect`, `like`, `contains`, `not_`, `round`, `year`, `month`, `day` and every Concept below. | |
| - A foreign key is a property whose value IS the parent concept, so join by traversal: `Visit.visitor_id.name`, never by comparing id columns. | |
| - Group with `.per(...)` on the aggregate. Wrap the projection in `distinct(...)` only when the question groups by the value being projected; leave it off when it groups by an entity and projects one of that entity's attributes, because two entities sharing the value are two rows. | |
| - `top`/`bottom` are filters and go inside `where(...)`, always with an explicit `asc(...)` or `desc(...)` sort key. | |
| - Conjunction is separate `where(...)` arguments; disjunction is `|`; never Python `and`/`or`/`not`. | |
| - Finish with exactly: result = <query>.to_dict()""" | |
| # ChatML, the template `apply_chat_template(..., add_generation_prompt=True)` produced for | |
| # every training example. A fine-tune's prompt format is part of its weights; sending a | |
| # different one asks for something the model never saw. `ollama show --template` is the | |
| # one-line check: if it prints a bare {{ .Prompt }}, no system prompt is reaching it. | |
| TEMPLATE """{{ if .System }}<|im_start|>system | |
| {{ .System }}<|im_end|> | |
| {{ end }}<|im_start|>user | |
| {{ .Prompt }}<|im_end|> | |
| <|im_start|>assistant | |
| """ | |
| # 16384, not the 2048 default. A BIRD schema in the trained shape runs to thousands of | |
| # tokens and the default truncates the prompt BEFORE the question, so the model answers a | |
| # schema dump it was never asked about. | |
| PARAMETER num_ctx 16384 | |
| PARAMETER temperature 0 | |
| PARAMETER stop "<|im_end|>" | |