Text Generation
Transformers
Safetensors
laguna
laguna-s-2.1
vllm
quantized
rfa
4-bit precision
conversational
custom_code
8-bit precision
Instructions to use tcclaviger/Laguna-S-2.1-RFA_L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tcclaviger/Laguna-S-2.1-RFA_L with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tcclaviger/Laguna-S-2.1-RFA_L", 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("tcclaviger/Laguna-S-2.1-RFA_L", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("tcclaviger/Laguna-S-2.1-RFA_L", 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 tcclaviger/Laguna-S-2.1-RFA_L with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tcclaviger/Laguna-S-2.1-RFA_L" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tcclaviger/Laguna-S-2.1-RFA_L", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tcclaviger/Laguna-S-2.1-RFA_L
- SGLang
How to use tcclaviger/Laguna-S-2.1-RFA_L 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 "tcclaviger/Laguna-S-2.1-RFA_L" \ --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": "tcclaviger/Laguna-S-2.1-RFA_L", "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 "tcclaviger/Laguna-S-2.1-RFA_L" \ --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": "tcclaviger/Laguna-S-2.1-RFA_L", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tcclaviger/Laguna-S-2.1-RFA_L with Docker Model Runner:
docker model run hf.co/tcclaviger/Laguna-S-2.1-RFA_L
Add eval results notice to model card
Browse files
README.md
CHANGED
|
@@ -34,6 +34,27 @@ base_model_relation: quantized
|
|
| 34 |
> exactly as documented in the vLLM section below — the RFA quant does not touch the
|
| 35 |
> attention path, so the DFlash draft head runs unchanged.
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
---
|
| 38 |
|
| 39 |
<p align="center">
|
|
|
|
| 34 |
> exactly as documented in the vLLM section below — the RFA quant does not touch the
|
| 35 |
> attention path, so the DFlash draft head runs unchanged.
|
| 36 |
|
| 37 |
+
> [!NOTE]
|
| 38 |
+
> ## Evaluation results (this RFA quant)
|
| 39 |
+
>
|
| 40 |
+
> | Eval | Result |
|
| 41 |
+
> |---|---|
|
| 42 |
+
> | Throughput | 80.6 tok/s out @ conc 1 (DFlash accept ~2.1); 615.7 tok/s out @ conc 50, ISL 512 |
|
| 43 |
+
> | WikiText-2 PPL | 8.109 ± 0.043 (n_ctx 2048, llama.cpp-compatible) |
|
| 44 |
+
> | Loglikelihood acc | arc_challenge 0.503 / arc_easy 0.769 / winogrande 0.658 / hellaswag 0.814 (acc_norm) |
|
| 45 |
+
> | tool-eval-bench (no-think) | 89/100 (full 69 scenarios) |
|
| 46 |
+
> | GSM8K / MMLU / IFEval | 90% / 60% / 95% (prompt-level) |
|
| 47 |
+
> | Long-context code recall | 0.980 overall (py 1.00 / js 0.93 / rs 0.99 / cpp 1.00); tool pass 93.5% |
|
| 48 |
+
> | Hard Mode agentic (thinking-ON) | 73/100 — 10 pass / 2 partial / 3 fail |
|
| 49 |
+
>
|
| 50 |
+
> **Test harnesses:** `vllm bench serve` (random dataset, saturation sweep) ·
|
| 51 |
+
> llama.cpp-compatible WikiText-2 perplexity · lm-evaluation-harness (loglikelihood,
|
| 52 |
+
> local-completions) · tool-eval-bench v2 (69 scenarios + GSM8K/MMLU/IFEval + 15
|
| 53 |
+
> Hard Mode scenarios) · codeneedle (positional recall, 4 corpora + tool pass).
|
| 54 |
+
>
|
| 55 |
+
> **Hardware:** `tcclaviger/vllm:latest`, 4× AMD AI PRO R9700 GPUs (TP4), Ryzen 9
|
| 56 |
+
> 9950X, 256 GB DDR5-6000. (Not yet fully tuned for throughput.)
|
| 57 |
+
|
| 58 |
---
|
| 59 |
|
| 60 |
<p align="center">
|