Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3repo_id = "atrost/nanochat-d12-nested-kl-long-20260413"
4tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True, torch_dtype="auto")
6
7small = AutoModelForCausalLM.from_pretrained(
8 repo_id,
9 subfolder="prefix-1",
10 trust_remote_code=True,
11 torch_dtype="auto",
12)trust_remote_code=True is required because this model uses a custom nested architecture and tokenizer.