Instructions to use Lucebox/Laguna-XS.2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Lucebox/Laguna-XS.2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Lucebox/Laguna-XS.2-GGUF", filename="laguna-xs2-Q4_K_M.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 Lucebox/Laguna-XS.2-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lucebox/Laguna-XS.2-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Lucebox/Laguna-XS.2-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lucebox/Laguna-XS.2-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Lucebox/Laguna-XS.2-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 Lucebox/Laguna-XS.2-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Lucebox/Laguna-XS.2-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 Lucebox/Laguna-XS.2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Lucebox/Laguna-XS.2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Lucebox/Laguna-XS.2-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Lucebox/Laguna-XS.2-GGUF with Ollama:
ollama run hf.co/Lucebox/Laguna-XS.2-GGUF:Q4_K_M
- Unsloth Studio new
How to use Lucebox/Laguna-XS.2-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 Lucebox/Laguna-XS.2-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 Lucebox/Laguna-XS.2-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Lucebox/Laguna-XS.2-GGUF to start chatting
- Docker Model Runner
How to use Lucebox/Laguna-XS.2-GGUF with Docker Model Runner:
docker model run hf.co/Lucebox/Laguna-XS.2-GGUF:Q4_K_M
- Lemonade
How to use Lucebox/Laguna-XS.2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Lucebox/Laguna-XS.2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Laguna-XS.2-GGUF-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -60,22 +60,31 @@ Measured with `bench_laguna_generate` from lucebox-hub (dflash autoregressive fo
|
|
| 60 |
### lucebox-hub (dflash + PFlash, recommended for 128K)
|
| 61 |
|
| 62 |
```bash
|
|
|
|
| 63 |
git clone https://github.com/Luce-Org/lucebox-hub
|
| 64 |
cd lucebox-hub/dflash
|
| 65 |
-
|
|
|
|
|
|
|
| 66 |
cmake --build build -j
|
| 67 |
|
|
|
|
| 68 |
hf download Lucebox/Laguna-XS.2-GGUF laguna-xs2-Q4_K_M.gguf --local-dir models/
|
| 69 |
-
hf download poolside/Laguna-XS.2 chat_template.jinja tokenizer.json tokenizer_config.json
|
|
|
|
| 70 |
|
|
|
|
|
|
|
| 71 |
python3 scripts/server.py \
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
|
|
|
|
| 76 |
curl http://localhost:8000/v1/chat/completions \
|
| 77 |
-
|
| 78 |
-
|
| 79 |
```
|
| 80 |
|
| 81 |
## License
|
|
|
|
| 60 |
### lucebox-hub (dflash + PFlash, recommended for 128K)
|
| 61 |
|
| 62 |
```bash
|
| 63 |
+
# clone
|
| 64 |
git clone https://github.com/Luce-Org/lucebox-hub
|
| 65 |
cd lucebox-hub/dflash
|
| 66 |
+
|
| 67 |
+
# build with sm_86 (3090 / A6000)
|
| 68 |
+
cmake -B build -DCMAKE_CUDA_ARCHITECTURES=86
|
| 69 |
cmake --build build -j
|
| 70 |
|
| 71 |
+
# fetch the Q4_K_M GGUF + Poolside tokenizer
|
| 72 |
hf download Lucebox/Laguna-XS.2-GGUF laguna-xs2-Q4_K_M.gguf --local-dir models/
|
| 73 |
+
hf download poolside/Laguna-XS.2 chat_template.jinja tokenizer.json tokenizer_config.json \
|
| 74 |
+
special_tokens_map.json config.json --local-dir models/Laguna-XS-2
|
| 75 |
|
| 76 |
+
# run the OpenAI server (same server.py as qwen35, arch auto-detected from GGUF).
|
| 77 |
+
# -ctk/-ctv q4_0 keeps the 131K KV cache under ~6 GB so weights + KV fit on 24 GB.
|
| 78 |
python3 scripts/server.py \
|
| 79 |
+
--target models/laguna-xs2-Q4_K_M.gguf \
|
| 80 |
+
--tokenizer models/Laguna-XS-2 \
|
| 81 |
+
--port 8000 --max-ctx 131072 \
|
| 82 |
+
-ctk q4_0 -ctv q4_0
|
| 83 |
|
| 84 |
+
# chat
|
| 85 |
curl http://localhost:8000/v1/chat/completions \
|
| 86 |
+
-H "Content-Type: application/json" \
|
| 87 |
+
-d '{"model":"luce-dflash","messages":[{"role":"user","content":"hello"}],"stream":true}'
|
| 88 |
```
|
| 89 |
|
| 90 |
## License
|