Instructions to use sneedjak/Adelic-Qwen3.6-27B-Topology 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 sneedjak/Adelic-Qwen3.6-27B-Topology 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 sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0 # Run inference directly in the terminal: llama cli -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0 # Run inference directly in the terminal: llama cli -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
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 sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
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 sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
Use Docker
docker model run hf.co/sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
- LM Studio
- Jan
- Ollama
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with Ollama:
ollama run hf.co/sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
- Unsloth Desktop
- Pi
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with Docker Model Runner:
docker model run hf.co/sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
- Lemonade
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
Run and chat with the model
lemonade run user.Adelic-Qwen3.6-27B-Topology-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
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 sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sneedjak/Adelic-Qwen3.6-27B-Topology with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0
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:8080/v1 \ --custom-model-id "sneedjak/Adelic-Qwen3.6-27B-Topology:Q8_0" \ --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"
Adelic-Qwen3.6-27B-Topology
This repository contains the full 27B Qwen 3.6 weights fused with the custom Adรจlic Cache topological architecture.
By injecting the Adรจlic DynamicTopologyRouter and Medoid-Value similarity clustering into the Qwen attention layers, this architecture aggressively condenses the Key-Value (KV) cache into a $p$-adic Bruhat-Tits tree. This bounds the physical VRAM footprint to $\mathcal{O}(\log N)$, allowing for infinite context length generation on consumer hardware without Out-Of-Memory (OOM) crashes.
This repository hosts both the raw PyTorch architecture files (for transformers) and a fully compiled Q8_0 GGUF file ready for local inference!
๐ Usage (GGUF / llama.cpp)
The easiest way to run this model with infinite context on consumer hardware is using the provided GGUF file: adelic-qwen-27b-q8_0.gguf.
Note: To utilize the Adรจlic topology in GGUF, you must run it using the experimental Adรจlic llama.cpp fork which contains the custom C++/CUDA memory pruning backend.
# Clone the experimental backend
git clone -b experimental-gguf-port https://github.com/sneed-and-feed/llama.cpp.git
cd llama.cpp
make -j
# Run the GGUF model with massive context (-c)
./llama-cli -m /path/to/adelic-qwen-27b-q8_0.gguf \
-p "Explain the significance of the Bruhat-Tits tree in p-adic geometry." \
-n 512 \
-c 100000 \
-ngl 99
Even with -c 100000 context length, the KV-cache will automatically condense, preventing your VRAM from blowing up!
๐ Usage (PyTorch / Transformers)
If you prefer to run the model in Python, this repository also hosts the custom architecture wrapper. You must load the official Qwen weights and inject this architecture at runtime using trust_remote_code=True.
This implementation includes an $\mathcal{O}(1)$ SRAM Triton Kernel for hardware-accelerated clustering on CUDA GPUs, and will seamlessly drop down to an $\mathcal{O}(N^2)$ pure-PyTorch fallback if you run it locally on a CPU/Mac.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig
# 1. Load the official Qwen tokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.6-27B", trust_remote_code=True)
# 2. Load the Adรจlic configuration from this repo
config = AutoConfig.from_pretrained(
"sneedjak/Adelic-Qwen3.6-27B-Topology",
trust_remote_code=True
)
# 3. Load the OFFICIAL 27B weights into the ADรLIC architecture
model = AutoModelForCausalLM.from_pretrained(
"sneedjak/Adelic-Qwen3.6-27B-Topology", # Pulls the custom architecture
pretrained_model_name_or_path="Qwen/Qwen3.6-27B", # Pulls the actual 27B weights
config=config,
device_map="auto",
trust_remote_code=True,
torch_dtype=torch.bfloat16
)
# 4. Generate with infinite context!
prompt = "The quick brown fox jumps over the lazy dog. " * 50000
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# The KV-cache will automatically condense, preventing your GPU from crashing.
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Performance & Limitations
- Triton / CUDA Acceleration: The condensation algorithm executes directly in GPU SRAM registers. It avoids global VRAM read/writes, making the topological pruning virtually zero-overhead compared to native FlashAttention.
- RoPE Coherence (Medoid-Key Selection): The strict geometry of Rotary Position Embeddings (RoPE) is preserved by explicitly dropping the isolated rotational keys and carrying forward the true logical position, preventing the decay that typically plagues grouped-cache algorithms.
- Semantic Fact Retrieval: On the LongBench QASPER dataset, this architecture successfully retrieved grounded facts from 10,000+ tokens away despite the 10x topological compression of the KV-cache.
- Formatting Degradation: Because topological compression is lossy, the model's surface-level syntactic formatting (e.g., RLHF alignment
<think>tags) degrades into a stream-of-consciousness format. While semantic facts are preserved, raw string-matching $n$-gram benchmark scores (like F1) will be lower than the uncompressed baseline. (Note: This repository hosts zero-shot un-finetuned router weights).
For full mathematical proofs of the RoPE coherence under topological compression, see the paper: Llama Surgery: Injecting Differentiable p-Adic Topology into Pre-Trained LLMs.
- Downloads last month
- 11
8-bit