Instructions to use dranger003/mamba-2.8b-hf-GGUF 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 dranger003/mamba-2.8b-hf-GGUF 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 dranger003/mamba-2.8b-hf-GGUF:F16 # Run inference directly in the terminal: llama cli -hf dranger003/mamba-2.8b-hf-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dranger003/mamba-2.8b-hf-GGUF:F16 # Run inference directly in the terminal: llama cli -hf dranger003/mamba-2.8b-hf-GGUF: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 dranger003/mamba-2.8b-hf-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf dranger003/mamba-2.8b-hf-GGUF: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 dranger003/mamba-2.8b-hf-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf dranger003/mamba-2.8b-hf-GGUF:F16
Use Docker
docker model run hf.co/dranger003/mamba-2.8b-hf-GGUF:F16
- LM Studio
- Jan
- vLLM
How to use dranger003/mamba-2.8b-hf-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dranger003/mamba-2.8b-hf-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dranger003/mamba-2.8b-hf-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dranger003/mamba-2.8b-hf-GGUF:F16
- Ollama
How to use dranger003/mamba-2.8b-hf-GGUF with Ollama:
ollama run hf.co/dranger003/mamba-2.8b-hf-GGUF:F16
- Unsloth Studio
How to use dranger003/mamba-2.8b-hf-GGUF 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 dranger003/mamba-2.8b-hf-GGUF 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 dranger003/mamba-2.8b-hf-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dranger003/mamba-2.8b-hf-GGUF to start chatting
- Docker Model Runner
How to use dranger003/mamba-2.8b-hf-GGUF with Docker Model Runner:
docker model run hf.co/dranger003/mamba-2.8b-hf-GGUF:F16
- Lemonade
How to use dranger003/mamba-2.8b-hf-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dranger003/mamba-2.8b-hf-GGUF:F16
Run and chat with the model
lemonade run user.mamba-2.8b-hf-GGUF-F16
List all available models
lemonade list
- Atomic Chat
NOTE: These weights require the latest build of llama.cpp (i.e. commit c2101a2). More details here.
From the author of the llama.cpp patch:
I started working on this as an experiment and because I wanted to try Mamba models with llama.cpp (also, there have been quite a few finetunes already). Turns out that implementing support for a novel model architecture is quite fun (well, at least when it finally works). The most powerful machine on which I try LLMs is a low-power laptop with 8GB of ram and an Intel CPU (no discrete GPU), so I can't try Mamba-3B in its full f32 glory (the full weights take 11GB), but at least now it's possible to use it quantized.
Constant memory usage is a big advantage of Mamba models, but this also means that previous states are not all kept in memory (at least in the current implementation, only the last one is kept), which means there might be more prompt re-processing than necessary in the server example, especially if your client trims the end of the output (it's also problematic that the stop token(s) are not included in the server's responses). The main example has no such problem.
Currently, the initial text generation speed for Mamba is a bit slower than for Transformer-based models (with empty context), but unlike them, Mamba's speed does not degrade with the amount of tokens processed. Also note that quantization may make the state unstable (making the output gibberish), but this needs more testing to figure out how much this happens (because I only saw it happen with very small models (130M), and not yet with bigger ones (3B)).
For testing, I recommend converting from https://huggingface.co/state-spaces/mamba-130m-hf since it's small, the config.json doesn't require modification, the tokenizer is already next to the model files, and the token_embd weight is shared with the output weight, so the download is smaller.
- Downloads last month
- 99
6-bit
8-bit
16-bit
32-bit
Model tree for dranger003/mamba-2.8b-hf-GGUF
Base model
state-spaces/mamba-2.8b-hf