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
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
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
Update checkpoints_all32_d128_block_reserve_0_1_2_35/search_step_1000.compare_retrieval.json
Browse files
checkpoints_all32_d128_block_reserve_0_1_2_35/search_step_1000.compare_retrieval.json
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "Qwen/Qwen3-4B-Instruct-2507",
|
| 3 |
+
"ckpt": "/tmp/checkpoints_all32_d128_block_reserve_0_1_2_35/search_step_1000.pt",
|
| 4 |
+
"by_K": {
|
| 5 |
+
"128": {
|
| 6 |
+
"raw_qk": {
|
| 7 |
+
"per_layer": {
|
| 8 |
+
"3": 0.9387637376785278,
|
| 9 |
+
"4": 0.9440614581108093,
|
| 10 |
+
"5": 0.96429443359375,
|
| 11 |
+
"6": 0.9560344219207764,
|
| 12 |
+
"7": 0.9818542897701263,
|
| 13 |
+
"8": 0.9707900285720825,
|
| 14 |
+
"9": 0.9587394297122955,
|
| 15 |
+
"10": 0.9742867350578308,
|
| 16 |
+
"11": 0.9763059914112091,
|
| 17 |
+
"12": 0.9611693322658539,
|
| 18 |
+
"13": 0.9707654714584351,
|
| 19 |
+
"14": 0.9733296930789948,
|
| 20 |
+
"15": 0.9675203263759613,
|
| 21 |
+
"16": 0.9556995928287506,
|
| 22 |
+
"17": 0.9593449831008911,
|
| 23 |
+
"18": 0.9652450382709503,
|
| 24 |
+
"19": 0.9612957835197449,
|
| 25 |
+
"20": 0.9591256380081177,
|
| 26 |
+
"21": 0.9657162129878998,
|
| 27 |
+
"22": 0.962736189365387,
|
| 28 |
+
"23": 0.9788879752159119,
|
| 29 |
+
"24": 0.9710511267185211,
|
| 30 |
+
"25": 0.9860879778862,
|
| 31 |
+
"26": 0.9775076508522034,
|
| 32 |
+
"27": 0.977691113948822,
|
| 33 |
+
"28": 0.9794201850891113,
|
| 34 |
+
"29": 0.9821525514125824,
|
| 35 |
+
"30": 0.9875719547271729,
|
| 36 |
+
"31": 0.9842455685138702,
|
| 37 |
+
"32": 0.9791028797626495,
|
| 38 |
+
"33": 0.9772593379020691,
|
| 39 |
+
"34": 0.9759000241756439
|
| 40 |
+
},
|
| 41 |
+
"avg": 0.969498660415411
|
| 42 |
+
},
|
| 43 |
+
"learned": {
|
| 44 |
+
"per_layer": {
|
| 45 |
+
"3": 0.9244755506515503,
|
| 46 |
+
"4": 0.9368151426315308,
|
| 47 |
+
"5": 0.9484244585037231,
|
| 48 |
+
"6": 0.939052551984787,
|
| 49 |
+
"7": 0.9830892086029053,
|
| 50 |
+
"8": 0.9710568785667419,
|
| 51 |
+
"9": 0.9766820967197418,
|
| 52 |
+
"10": 0.9707906544208527,
|
| 53 |
+
"11": 0.9762083292007446,
|
| 54 |
+
"12": 0.9698493182659149,
|
| 55 |
+
"13": 0.9710436761379242,
|
| 56 |
+
"14": 0.9732040166854858,
|
| 57 |
+
"15": 0.972749650478363,
|
| 58 |
+
"16": 0.9609748125076294,
|
| 59 |
+
"17": 0.9665586054325104,
|
| 60 |
+
"18": 0.9724838137626648,
|
| 61 |
+
"19": 0.9691765010356903,
|
| 62 |
+
"20": 0.9757413268089294,
|
| 63 |
+
"21": 0.9799380302429199,
|
| 64 |
+
"22": 0.9698161482810974,
|
| 65 |
+
"23": 0.9849565327167511,
|
| 66 |
+
"24": 0.9785935282707214,
|
| 67 |
+
"25": 0.9885723888874054,
|
| 68 |
+
"26": 0.9855012595653534,
|
| 69 |
+
"27": 0.9834729731082916,
|
| 70 |
+
"28": 0.9848337769508362,
|
| 71 |
+
"29": 0.98735311627388,
|
| 72 |
+
"30": 0.9873296022415161,
|
| 73 |
+
"31": 0.9829616844654083,
|
| 74 |
+
"32": 0.9795172214508057,
|
| 75 |
+
"33": 0.9666652083396912,
|
| 76 |
+
"34": 0.9603306651115417
|
| 77 |
+
},
|
| 78 |
+
"avg": 0.9711943352594972
|
| 79 |
+
}
|
| 80 |
+
},
|
| 81 |
+
"256": {
|
| 82 |
+
"raw_qk": {
|
| 83 |
+
"per_layer": {
|
| 84 |
+
"3": 0.9856403172016144,
|
| 85 |
+
"4": 0.9863723814487457,
|
| 86 |
+
"5": 0.9927175343036652,
|
| 87 |
+
"6": 0.9899796843528748,
|
| 88 |
+
"7": 0.9961064755916595,
|
| 89 |
+
"8": 0.9944310188293457,
|
| 90 |
+
"9": 0.9924624264240265,
|
| 91 |
+
"10": 0.9945598244667053,
|
| 92 |
+
"11": 0.9956617951393127,
|
| 93 |
+
"12": 0.9914700388908386,
|
| 94 |
+
"13": 0.9947893917560577,
|
| 95 |
+
"14": 0.9956192076206207,
|
| 96 |
+
"15": 0.9947386384010315,
|
| 97 |
+
"16": 0.9918601512908936,
|
| 98 |
+
"17": 0.9932802319526672,
|
| 99 |
+
"18": 0.994801938533783,
|
| 100 |
+
"19": 0.9929636716842651,
|
| 101 |
+
"20": 0.9928486049175262,
|
| 102 |
+
"21": 0.9940518736839294,
|
| 103 |
+
"22": 0.9925838708877563,
|
| 104 |
+
"23": 0.9956205189228058,
|
| 105 |
+
"24": 0.9944405257701874,
|
| 106 |
+
"25": 0.99702388048172,
|
| 107 |
+
"26": 0.9963724911212921,
|
| 108 |
+
"27": 0.9952751994132996,
|
| 109 |
+
"28": 0.9952269494533539,
|
| 110 |
+
"29": 0.9970046579837799,
|
| 111 |
+
"30": 0.9976439476013184,
|
| 112 |
+
"31": 0.9967932999134064,
|
| 113 |
+
"32": 0.9949435591697693,
|
| 114 |
+
"33": 0.9954463541507721,
|
| 115 |
+
"34": 0.9949491024017334
|
| 116 |
+
},
|
| 117 |
+
"avg": 0.9939899863675237
|
| 118 |
+
},
|
| 119 |
+
"learned": {
|
| 120 |
+
"per_layer": {
|
| 121 |
+
"3": 0.9771333336830139,
|
| 122 |
+
"4": 0.9823162257671356,
|
| 123 |
+
"5": 0.9861737489700317,
|
| 124 |
+
"6": 0.9809035956859589,
|
| 125 |
+
"7": 0.9963934123516083,
|
| 126 |
+
"8": 0.9932794272899628,
|
| 127 |
+
"9": 0.9953930974006653,
|
| 128 |
+
"10": 0.9923880398273468,
|
| 129 |
+
"11": 0.994959145784378,
|
| 130 |
+
"12": 0.9928728640079498,
|
| 131 |
+
"13": 0.9931342303752899,
|
| 132 |
+
"14": 0.9937034547328949,
|
| 133 |
+
"15": 0.9947409331798553,
|
| 134 |
+
"16": 0.9912147521972656,
|
| 135 |
+
"17": 0.99372997879982,
|
| 136 |
+
"18": 0.9954918026924133,
|
| 137 |
+
"19": 0.9936331808567047,
|
| 138 |
+
"20": 0.9959999024868011,
|
| 139 |
+
"21": 0.99661585688591,
|
| 140 |
+
"22": 0.993903785943985,
|
| 141 |
+
"23": 0.9974819421768188,
|
| 142 |
+
"24": 0.9961839318275452,
|
| 143 |
+
"25": 0.9976893067359924,
|
| 144 |
+
"26": 0.9971556663513184,
|
| 145 |
+
"27": 0.9965596199035645,
|
| 146 |
+
"28": 0.9969134330749512,
|
| 147 |
+
"29": 0.9974974989891052,
|
| 148 |
+
"30": 0.9971778690814972,
|
| 149 |
+
"31": 0.9964099228382111,
|
| 150 |
+
"32": 0.9948908686637878,
|
| 151 |
+
"33": 0.9909328520298004,
|
| 152 |
+
"34": 0.98967644572258
|
| 153 |
+
},
|
| 154 |
+
"avg": 0.9932046914473176
|
| 155 |
+
}
|
| 156 |
+
}
|
| 157 |
+
},
|
| 158 |
+
"learned_over_raw_K128": 1.0017490223693137
|
| 159 |
+
}
|