Transformers
GGUF
sparse-attention
approximate-nearest-neighbors
faiss
qwen3
long-context
conversational
Instructions to use datasysdev/ann-sparseattention with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use datasysdev/ann-sparseattention with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("datasysdev/ann-sparseattention", dtype="auto") - llama-cpp-python
How to use datasysdev/ann-sparseattention with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="datasysdev/ann-sparseattention", filename="gguf/Qwen3-4B-Instruct-2507-F16-ann-6layer-k128-v2.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use datasysdev/ann-sparseattention with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf datasysdev/ann-sparseattention:F16 # Run inference directly in the terminal: llama-cli -hf datasysdev/ann-sparseattention:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf datasysdev/ann-sparseattention:F16 # Run inference directly in the terminal: llama-cli -hf datasysdev/ann-sparseattention:F16
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 datasysdev/ann-sparseattention:F16 # Run inference directly in the terminal: ./llama-cli -hf datasysdev/ann-sparseattention:F16
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 datasysdev/ann-sparseattention:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf datasysdev/ann-sparseattention:F16
Use Docker
docker model run hf.co/datasysdev/ann-sparseattention:F16
- LM Studio
- Jan
- Ollama
How to use datasysdev/ann-sparseattention with Ollama:
ollama run hf.co/datasysdev/ann-sparseattention:F16
- Unsloth Studio new
How to use datasysdev/ann-sparseattention 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 datasysdev/ann-sparseattention 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 datasysdev/ann-sparseattention to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for datasysdev/ann-sparseattention to start chatting
- Pi new
How to use datasysdev/ann-sparseattention with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf datasysdev/ann-sparseattention:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "datasysdev/ann-sparseattention:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use datasysdev/ann-sparseattention with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf datasysdev/ann-sparseattention:F16
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 datasysdev/ann-sparseattention:F16
Run Hermes
hermes
- Docker Model Runner
How to use datasysdev/ann-sparseattention with Docker Model Runner:
docker model run hf.co/datasysdev/ann-sparseattention:F16
- Lemonade
How to use datasysdev/ann-sparseattention with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull datasysdev/ann-sparseattention:F16
Run and chat with the model
lemonade run user.ann-sparseattention-F16
List all available models
lemonade list
| { | |
| "ppl_full": 9.958177526791891, | |
| "by_K": { | |
| "16": { | |
| "recall_avg": 0.2488617408769063, | |
| "recall_per_layer": { | |
| "4": 0.06929636437908497, | |
| "8": 0.209304789624183, | |
| "12": 0.2291079452614379, | |
| "16": 0.31758450776143793, | |
| "20": 0.3559002246732026, | |
| "24": 0.3119766135620915 | |
| }, | |
| "ppl_ann": 10.705916802088419, | |
| "ppl_gap_relative": 0.0750879639657738 | |
| }, | |
| "32": { | |
| "recall_avg": 0.22758947123797024, | |
| "recall_per_layer": { | |
| "4": 0.08549663713910761, | |
| "8": 0.1827639281906168, | |
| "12": 0.20015622436843833, | |
| "16": 0.29272973568733596, | |
| "20": 0.31894826012959315, | |
| "24": 0.28544204191272965 | |
| }, | |
| "ppl_ann": 10.40695869922638, | |
| "ppl_gap_relative": 0.04506659689758181 | |
| }, | |
| "64": { | |
| "recall_avg": 0.2313686687059083, | |
| "recall_per_layer": { | |
| "4": 0.109822914083168, | |
| "8": 0.18851337735615079, | |
| "12": 0.2026925869088955, | |
| "16": 0.29454920531580686, | |
| "20": 0.3052448898396164, | |
| "24": 0.28738903873181215 | |
| }, | |
| "ppl_ann": 10.19960351785024, | |
| "ppl_gap_relative": 0.02424399348262342 | |
| }, | |
| "128": { | |
| "recall_avg": 0.2596596885325661, | |
| "recall_per_layer": { | |
| "4": 0.15761951733660953, | |
| "8": 0.22230808709257394, | |
| "12": 0.23406030798471103, | |
| "16": 0.3191429876512097, | |
| "20": 0.31382029543640794, | |
| "24": 0.31100693569388443 | |
| }, | |
| "ppl_ann": 10.039695183436075, | |
| "ppl_gap_relative": 0.008186001547458431 | |
| }, | |
| "256": { | |
| "recall_avg": 0.3158585866292318, | |
| "recall_per_layer": { | |
| "4": 0.23482767740885416, | |
| "8": 0.28606397840711806, | |
| "12": 0.2944536844889323, | |
| "16": 0.36897023518880206, | |
| "20": 0.35041291978624134, | |
| "24": 0.3604230244954427 | |
| }, | |
| "ppl_ann": 9.879923025767008, | |
| "ppl_gap_relative": -0.0078583155215243 | |
| }, | |
| "512": { | |
| "recall_avg": 0.4077308518545968, | |
| "recall_per_layer": { | |
| "4": 0.34663236708868117, | |
| "8": 0.3869971320742652, | |
| "12": 0.3905042466663179, | |
| "16": 0.45224675678071524, | |
| "20": 0.42589560009184335, | |
| "24": 0.444109008425758 | |
| }, | |
| "ppl_ann": 9.670466581980387, | |
| "ppl_gap_relative": -0.028891927668233962 | |
| } | |
| }, | |
| "model": "Qwen/Qwen3-4B-Instruct-2507", | |
| "checkpoint": "search_step_2000.pt", | |
| "trained_layers": [4, 8, 12, 16, 20, 24], | |
| "d_search": 64, | |
| "seq_len": 4096, | |
| "num_eval_batches": 12, | |
| "eval_dataset": "Salesforce/wikitext (wikitext-103-raw-v1, validation split)" | |
| } | |