Instructions to use modrill/MN9-SHORT-515K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use modrill/MN9-SHORT-515K with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "modrill/MN9-SHORT-515K") - Notebooks
- Google Colab
- Kaggle
File size: 686 Bytes
ad27ab2 3d83937 ad27ab2 3d83937 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """Minimal load example for modrill/MN9-SHORT-515K."""
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE = "Qwen/Qwen3-4B-Base"
ADAPTER = "modrill/MN9-SHORT-515K"
def load(device_map="auto"):
tok = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
BASE, torch_dtype="auto", device_map=device_map, trust_remote_code=True
)
model = PeftModel.from_pretrained(model, ADAPTER)
model.eval()
return tok, model
if __name__ == "__main__":
tok, model = load()
print("loaded", type(model).__name__, "params", sum(p.numel() for p in model.parameters()))
|