Downloads · 30 days
29
9% of all-time downloads
GoldenGekko/LinguaLaboratoriumMechanicus-instruct
LinguaLaboratoriumMechanicus-instruct is a text generation model from GoldenGekko. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
SFT-версия LinguaLaboratoriumMechanicus на ~2500 Q&A по лору WH40k.
Downloads · 30 days
29
9% of all-time downloads
All-time downloads
317
Public
Parameters
176M
702 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors702 MB · 99%
From the Hugging Face model README
SFT-версия LinguaLaboratoriumMechanicus на ~2500 Q&A по лору WH40k.
Та же, что у базовой модели (~163M параметров). Vocab 50 259 (<|user|>, <|assistant|>).
Чат-шаблон:
<|user|>
вопрос
<|assistant|>
ответ
Загрузка с trust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "GoldenGekko/LinguaLaboratoriumMechanicus-instruct"
device = "cuda" if torch.cuda.is_available() else "cpu"
question = "Что такое Гибельный шторм и как он повлиял на ход войны?"
prompt = f"<|user|>\n{question}\n<|assistant|>\n"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True).to(device)
inputs = tokenizer(prompt, return_tensors="pt").to(device)
output_ids = model.generate(
inputs["input_ids"],
max_new_tokens=120,
do_sample=False,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output_ids[0], skip_special_tokens=True).split("<|assistant|>")[-1].strip())
https://huggingface.co/GoldenGekko/LinguaLaboratoriumMechanicus-instruct