Views
No views yet
| Параметры | ~163M |
| Слоёв | 12 |
| Размерность | 768 |
| Голов внимания | 12 |
| Контекст | 1024 |
| Vocab | 50 257 |
| FFN | GELU, 4× expansion |
| Нормализация | Pre-LayerNorm |
trust_remote_code=True.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4repo_id = "GoldenGekko/LinguaLaboratoriumMechanicus"
5device = "cuda" if torch.cuda.is_available() else "cpu"
6
7tokenizer = AutoTokenizer.from_pretrained(repo_id)
8model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True).to(device)
9
10prompt = "В 31-м тысячелетии Империум"
11inputs = tokenizer(prompt, return_tensors="pt").to(device)
12output_ids = model.generate(
13 inputs["input_ids"],
14 max_new_tokens=100,
15 do_sample=True,
16 temperature=0.8,
17 top_k=40,
18 pad_token_id=tokenizer.pad_token_id,
19 eos_token_id=tokenizer.eos_token_id,
20)
21print(tokenizer.decode(output_ids[0], skip_special_tokens=True))https://huggingface.co/GoldenGekko/LinguaLaboratoriumMechanicus