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
Sampler Settings?
I apologize if I missed it, but what are the recommended sampler settings?
Thanks!
I apologize if I missed it, but what are the recommended sampler settings?
Thanks!
I saw this in the generation_config.json. Please note though this model is acting very strange...
{
"bos_token_id": 2,
"do_sample": true,
"eos_token_id": [
2,
24
],
"pad_token_id": 9,
"temperature": 1.0,
"top_p": 1.0,
"min_p": 0.0,
"top_k": 20,
"tool_call_parser": "poolside_v1",
"reasoning_parser": "poolside_v1",
"default_chat_template_kwargs": {
"enable_thinking": true
},
"speculative_config": {
"method": "dflash",
"source": "huggingface",
"model": "poolside/Laguna-S-2.1-DFlash",
"num_speculative_tokens": 15
}
}
Interesting. I'm not getting good results at all with those samplers. I've been tweaking here and there but so far Temp 1 and min-p 0.1 seems to be decent. Still honing it though.
Hi guys! Thanks for the comment.
Just to double check: are you struggling with making the BF16 variant work, or some other variant?
Q5XL unsloth quant with unquantized KV Cache. I also tried the Q4XL quant and didn’t notice a difference.
Thank you! I'll take a look in the coming days; those quants aren't officially ours, but it's still something that we'll investigate.
I did originally try the q4_m official quant and I didn’t notice a difference. I’ll go back to that and try some more tests.
Just a note; we'll have a new GGUF for q4_m tomorrow. We noticed some degradations with it internally after further testing. I'll reply here once it's been uploaded :)
I've spent a good bit of time narrowing down some good settings and this is what I think is a good balance of precision and creativity: --temp 1--top-k 50
Tested with Laguna-S-2.1-UD-Q5_K_XL
Hopefully this helps! (Updated with better sampler settings)