Downloads · 30 days
36
9% of all-time downloads
syvai/danskgpt-v4-12b
danskgpt-v4-12b is a text generation model from syvai. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-4.0.
A Danish fine-tune of google/gemma-4-12B-it, tuned to be strong on Danish understanding, knowledge and reasoning tasks. It is a text-only Gemma4ForCausalLM checkpoint in bf16. For an even stronger model see syvai/dans…
Downloads · 30 days
36
9% of all-time downloads
All-time downloads
398
Public
Parameters
11.9B
23.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors23.9 GB · 100%
From the Hugging Face model README
A Danish fine-tune of google/gemma-4-12B-it,
tuned to be strong on Danish understanding, knowledge and reasoning tasks. It is a text-only
Gemma4ForCausalLM checkpoint in bf16. For an even stronger model see
syvai/danskgpt-v4-31b.
The model uses Gemma-4's chat format — always go through apply_chat_template (or vLLM's
chat) so the <|turn> / <turn|> markers are added correctly.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "syvai/danskgpt-v4-12b"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "user", "content": "Forklar kort, hvad fotosyntese er, og hvorfor det er vigtigt."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
from vllm import LLM, SamplingParams
llm = LLM(model="syvai/danskgpt-v4-12b", dtype="bfloat16")
messages = [
{"role": "user", "content": "Giv mig tre forslag til en hyggelig weekendtur i Jylland."},
]
out = llm.chat(messages, SamplingParams(temperature=0.7, top_p=0.9, max_tokens=512))
print(out[0].outputs[0].text)
More Danish prompt ideas: "Omskriv denne sætning, så den bliver mere formel: ...",
"Opsummer teksten nedenfor i tre punkter på dansk: ...",
"Er følgende anmeldelse positiv eller negativ? ...".
danskgpt-v4-12b is a QLoRA fine-tune (rank 16, 4-bit NF4 base, bf16 compute) of
google/gemma-4-12B-it, trained on Danish task data to strengthen Danish understanding,
knowledge and reasoning.
Released under CC-BY-4.0, consistent with other SyvAI models. Use of the base model is additionally subject to Google's Gemma terms.