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)# pip install -U transformers accelerate # 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=256) 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
Commit History
-
Update README.md
Verified signature0e0cc59
-
Update README.md
Verified signatureabcc28b -
Update README.md
Verified signature39dddf4 -
Update chat_template.jinja
Verified signature1714be9 -
Add model-00005.safetensors
Verified signature8983b43 -
Update config.json
Verified signaturef73cde0 -
Add safetensors index
Verified signature2a32539 -
Add model-00012.safetensors
Verified signature16e207c -
Add model-00011.safetensors
Verified signature81b2d4a -
Add model-00010.safetensors
Verified signature2bd97f8 -
Add model-00009.safetensors
Verified signaturedea1bb9 -
Add model-00008.safetensors
Verified signature6949c0c -
Add model-00007.safetensors
Verified signatureea42069 -
Remove fire.gif
Verified signaturec25f24a -
Remove fire.gif from notice
Verified signaturefa46bac -
Add model-00006.safetensors
Verified signaturecca3f69 -
Add update notice: tokenizer refresh + dense/shared-expert BF16 preservation
Verified signaturedf12ba8 -
Add fire.gif
Verified signaturef1ce298 -
Add model-00004.safetensors
Verified signaturec48d752 -
Add model-00003.safetensors
Verified signaturec5de2f4 -
Add model-00002.safetensors
Verified signaturec9d5c6d -
Add model-00001.safetensors
Verified signature7d04209 -
Clarify bf16-preserved tensors: layer-0 dense MLP and shared experts
Verified signatured0ddb70 -
Add eval results notice to model card
Verified signature219e948 -
Update tokenizer_config.json to poolside upstream version
Verified signature24a49fa
-
Upload model-00010.safetensors with huggingface_hub
Verified signaturef12ab43 -
Add files using upload-large-folder tool
Verified signatured891c8d -
initial commit
Verified signaturee735c01