Downloads · 30 days
8
9% of all-time downloads
dogeplusplus/duo-laguna-adapter-smoke
duo-laguna-adapter-smoke is a text generation model from dogeplusplus. Use it when you need the model to write or continue text. It is set up for transformers.
This repository contains learned DuoAttention attention-head weights and custom loading code for poolside/Laguna-XS.2. It intentionally does not include the full Laguna base-model weights or tokenizer files.
Downloads · 30 days
8
9% of all-time downloads
All-time downloads
87
Public
Repo size
2.5 KB
Likes
0
Public
Click a slice to open those files.
.py20.2 KB · 52%
From the Hugging Face model README
This repository contains learned DuoAttention attention-head weights and custom
loading code for poolside/Laguna-XS.2. It intentionally does not include the full
Laguna base-model weights or tokenizer files.
Install optional tokenizer dependencies if needed:
pip install sentencepiece tiktoken
Load the tokenizer from the base Laguna model and the patched model from this adapter repository:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
adapter_repo = "dogeplusplus/duo-laguna-adapter-smoke"
base_model = "poolside/Laguna-XS.2"
tokenizer = AutoTokenizer.from_pretrained(
base_model,
trust_remote_code=True,
token=True,
)
model = AutoModelForCausalLM.from_pretrained(
adapter_repo,
trust_remote_code=True,
token=True,
torch_dtype="auto",
device_map="auto",
)
prompt = "The capital of France is"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
generated = model.generate(**inputs, max_new_tokens=32)
print(tokenizer.decode(generated[0], skip_special_tokens=True))
Use token=True after running hf auth login, or pass a token string directly
when loading private or gated repositories.