Instructions to use devingulliver/mamba-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use devingulliver/mamba-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="devingulliver/mamba-gguf", filename="mamba-1.4b/mamba-1.4b-f16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use devingulliver/mamba-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 devingulliver/mamba-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf devingulliver/mamba-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devingulliver/mamba-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf devingulliver/mamba-gguf: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 devingulliver/mamba-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf devingulliver/mamba-gguf: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 devingulliver/mamba-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf devingulliver/mamba-gguf:Q4_K_M
Use Docker
docker model run hf.co/devingulliver/mamba-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use devingulliver/mamba-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devingulliver/mamba-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devingulliver/mamba-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/devingulliver/mamba-gguf:Q4_K_M
- Ollama
How to use devingulliver/mamba-gguf with Ollama:
ollama run hf.co/devingulliver/mamba-gguf:Q4_K_M
- Unsloth Studio
How to use devingulliver/mamba-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 devingulliver/mamba-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 devingulliver/mamba-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for devingulliver/mamba-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use devingulliver/mamba-gguf with Docker Model Runner:
docker model run hf.co/devingulliver/mamba-gguf:Q4_K_M
- Lemonade
How to use devingulliver/mamba-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devingulliver/mamba-gguf:Q4_K_M
Run and chat with the model
lemonade run user.mamba-gguf-Q4_K_M
List all available models
lemonade list
error loading model: unknown model architecture: 'mamba'
#1
by tinchung - opened
I follow this notebook to setup llama-cpp on Kaggle notebook
when I try to load the LLM:
from llama_cpp import Llama
# model_path is location of to the GGUF model that you've download from HuggingFace on Colab
model_path = "/kaggle/working/models/mamba-130m/mamba-130m-q2_k.gguf"
#load the LLM
llm = Llama(model_path=model_path,
n_gpu_layers=-1) #load model while enabling GPU
it load everything and tell me that llama-cpp don't recognize mamba and give this error
llama_model_loader: - type f32: 193 tensors
llama_model_loader: - type q2_K: 48 tensors
llama_model_loader: - type q6_K: 1 tensors
error loading model: unknown model architecture: 'mamba'
llama_load_model_from_file: failed to load model
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[10], line 7
4 model_path = "/kaggle/working/models/mamba-130m/mamba-130m-q2_k.gguf"
6 #load the LLM
----> 7 llm = Llama(model_path=model_path,
8 n_gpu_layers=-1) #load model while enabling GPU
File /opt/conda/lib/python3.10/site-packages/llama_cpp/llama.py:340, in Llama.__init__(self, model_path, seed, n_ctx, n_batch, n_gpu_layers, main_gpu, tensor_split, rope_freq_base, rope_freq_scale, low_vram, mul_mat_q, f16_kv, logits_all, vocab_only, use_mmap, use_mlock, embedding, n_threads, last_n_tokens_size, lora_base, lora_path, numa, verbose, **kwargs)
336 with suppress_stdout_stderr():
337 self.model = llama_cpp.llama_load_model_from_file(
338 self.model_path.encode("utf-8"), self.params
339 )
--> 340 assert self.model is not None
342 if verbose:
343 self.ctx = llama_cpp.llama_new_context_with_model(self.model, self.params)
AssertionError:
use llama-b3615-bin-ubuntu-x64.zip
!./build/bin/llama-cli -m /content/mamba-2.8b-f32.gguf -p "Building a website can be done in 10 steps:"
it run in colab
thanks you