Instructions to use poolside/Laguna-S-2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use poolside/Laguna-S-2.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="poolside/Laguna-S-2.1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("poolside/Laguna-S-2.1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("poolside/Laguna-S-2.1", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use poolside/Laguna-S-2.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "poolside/Laguna-S-2.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "poolside/Laguna-S-2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/poolside/Laguna-S-2.1
- SGLang
How to use poolside/Laguna-S-2.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "poolside/Laguna-S-2.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "poolside/Laguna-S-2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "poolside/Laguna-S-2.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "poolside/Laguna-S-2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use poolside/Laguna-S-2.1 with Docker Model Runner:
docker model run hf.co/poolside/Laguna-S-2.1
Surprisingly good at creative writing!
I haven't dug into it too deeply, but, this model seems to perform surprisingly well at creative writing tasks - it's made some interesting and unexpected (in a good way) decisions I haven't seen in the actions characters take, vs even Gemma-4-31B.
I'm using the UD-Q4_K_XL quantization. I was less impressed with the creative writing when using the UD-Q2_K_XL quant, but I was able to squeeze surprisingly solid performance (PP: 453 t/s, TG:15.3) out of a system with only 12 GB of VRAM, and only moderate optimizing! (4070 Ti 12GB, 64 GB DDR5,14700k)
Despite this being described as a model aimed at agentic coding and long-horizon tasks, I do encourage folks to try it out for other sorts of things too!
Fully agree, very creative model
I haven't dug into it too deeply, but, this model seems to perform surprisingly well at creative writing tasks - it's made some interesting and unexpected (in a good way) decisions I haven't seen in the actions characters take, vs even Gemma-4-31B.
I'm using the UD-Q4_K_XL quantization. I was less impressed with the creative writing when using the UD-Q2_K_XL quant, but I was able to squeeze surprisingly solid performance (PP: 453 t/s, TG:15.3) out of a system with only 12 GB of VRAM, and only moderate optimizing! (4070 Ti 12GB, 64 GB DDR5,14700k)
Despite this being described as a model aimed at agentic coding and long-horizon tasks, I do encourage folks to try it out for other sorts of things too!
How can you fit UD-Q4_K_XL in 12VRAM+64RAM
How can you fit UD-Q4_K_XL in 12VRAM+64RAM
Oh, sorry, I wasn't clear on that - I've got two host systems - I ran it on the 12 GB VRAM/64 GB (DDR5) System, and i've also run it on a 48 GB VRAM (2x3090), 64 GB System (DDR4) - with the Q2 on the smaller VRAM system, and the Q4 on the larger. I was just saying that the Q2 system was "meh" in creative writing when comparing them.
For some metrics on the beefier system, from my llama-bench testing. (Worth noting, one of these 3090s only has a 4x PCI-E link, and I don't have NVLINK:
(ubatch is 1024, batch is 4096, split-mode is LAYER)
| Context | PP Speed | TG Speed | Tensor-Split | n-cpu-moe |
|---|---|---|---|---|
| 8192 | 367.0 | 24.8 | 11,5 | 21 |
| 32768 | 342.3 | 23.1 | 13,6 | 22 |
| 65536 | 310.0 | 21.5 | 11,5 | 23 |
| 262144 | 176.0 | 14.4 | 11,4 | 31 |
The splits seem weird,but that has to do - I believe - with the KV Cache (at least for this model) all ending up on GPU 0. Without these balacing values, at least with sm = layer, I get a lot of the model on one card's ram and a lot of it still in system ram, as the other card has very little loaded on it.