Text Generation
Transformers
Safetensors
Russian
lingua_laboratorium_mechanicus
causal-lm
custom-architecture
warhammer-40k
russian
custom_code
Instructions to use GoldenGekko/LinguaLaboratoriumMechanicus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GoldenGekko/LinguaLaboratoriumMechanicus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GoldenGekko/LinguaLaboratoriumMechanicus", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("GoldenGekko/LinguaLaboratoriumMechanicus", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GoldenGekko/LinguaLaboratoriumMechanicus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GoldenGekko/LinguaLaboratoriumMechanicus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GoldenGekko/LinguaLaboratoriumMechanicus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GoldenGekko/LinguaLaboratoriumMechanicus
- SGLang
How to use GoldenGekko/LinguaLaboratoriumMechanicus with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "GoldenGekko/LinguaLaboratoriumMechanicus" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GoldenGekko/LinguaLaboratoriumMechanicus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "GoldenGekko/LinguaLaboratoriumMechanicus" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GoldenGekko/LinguaLaboratoriumMechanicus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GoldenGekko/LinguaLaboratoriumMechanicus with Docker Model Runner:
docker model run hf.co/GoldenGekko/LinguaLaboratoriumMechanicus
LinguaLaboratoriumMechanicus
Претрейн кастомной decoder-only модели на русскоязычном корпусе лора Warhammer 40,000.
Архитектура
| Параметры | ~163M |
| Слоёв | 12 |
| Размерность | 768 |
| Голов внимания | 12 |
| Контекст | 1024 |
| Vocab | 50 257 |
| FFN | GELU, 4× expansion |
| Нормализация | Pre-LayerNorm |
Кастомная архитектура — загрузка с trust_remote_code=True.
Использование
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "GoldenGekko/LinguaLaboratoriumMechanicus"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True).to(device)
prompt = "В 31-м тысячелетии Империум"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
output_ids = model.generate(
inputs["input_ids"],
max_new_tokens=100,
do_sample=True,
temperature=0.8,
top_k=40,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
Связанные репозитории
- LinguaLaboratoriumMechanicus-instruct — SFT-версия для Q&A
Citation
https://huggingface.co/GoldenGekko/LinguaLaboratoriumMechanicus
- Downloads last month
- 32