Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

poolside
/
Laguna-S-2.1

Text Generation
Transformers
Safetensors
laguna
laguna-s-2.1
vllm
conversational
custom_code
Eval Results
Model card Files Files and versions
xet
Community
39

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]:]))
  • Inference
  • 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

Update README.md

#1
by Jiminator - opened Jul 21
base: refs/heads/main
←
from: refs/pr/1
Discussion Files changed
+20
-65
initial commit9fbf5791
Add files using upload-large-folder tool7d4bba47
Add files using upload-large-folder tool05933b66
Update generation_config.jsonce58847f
Update config.json07dd874e
fix(rope): YaRN attention_factor is (0.1*ln(factor)+1)*attn_factor, not the bare multiplier3eeaa697
Update config.json4fd88e9f
Update config.json37ac1e1c
config: fix 1M YaRN attention_factor (1.3466->1.4852 for factor 128) + add moe_router_logit_softcapping=0.0e5e19748
Add DFlash speculative_config (draft: Laguna-S-2.1-DFlash-polishing, 15 tok)885ad0e4
Set sampling to match production: temp=1, top_p=1, top_k=0 (disabled), min_p=046bfb04d
Update generation_config.jsonfbe31ba4
Add model card (adapted from Laguna XS 2.1)c96151b4
Add OpenMDW-1.1 license1c36e52c
Apply OpenMDW-1.1 license and responsible-use disclaimer (as XS 2.1)f2ba500e
Restore model card content26cc2f7a
Point llama.cpp section at poolsideai/llama.cpp laguna branchfd659adc
Point DFlash GGUF reference at Laguna-S-2.1-GGUF58274ed5
Set top_k 20 (eval-certified truncation, spec-decode-safe)5b3e3c33
Add community eval results (SWE-bench Multilingual, SWE-Bench Pro, DeepSWE)ba992c3f
Jiminator
Poolside org Jul 21
No description provided.
Update README.mdc2ca9e90
joerowell changed pull request status to merged Jul 21
joerowell deleted the refs/pr/1 ref Jul 21

· Sign up or log in to comment

Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs