How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Undi95/Lumimaid-Magnum-v4-12B")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Undi95/Lumimaid-Magnum-v4-12B")
model = AutoModelForCausalLM.from_pretrained("Undi95/Lumimaid-Magnum-v4-12B", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Merge of Lumimaid and Magnum as requested by some. UPDATE : Magnum v4 used in this merge as asked here

I used the DELLA merge method in mergekit and added a finetune of Nemo only on Claude input, trained on 16k ctx, in the mix.

Prompt template: Mistral

<s>[INST] {input} [/INST] {output}</s>
Downloads last month
225
Safetensors
Model size
12B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with Undi95/Lumimaid-Magnum-v4-12B.

Model tree for Undi95/Lumimaid-Magnum-v4-12B