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="mecoffey/NPC_brain")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("mecoffey/NPC_brain")
model = AutoModelForCausalLM.from_pretrained("mecoffey/NPC_brain")
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

Model Card for NPC Brain

This is a fine-tune of Open BMB's Mini CPM5 1B parameter model.

I have specifically trained it to be the "Brain" of my app for the Build Small Hackathon in June 2026

Recommendations

This model was trained with the following workflow in mind:

  • User prompt = physical description of a fantasy character.
  • User prompt + generated description = a timeline backstory for the character to get to know them.

The user prompt is designed to be short and simple. "something random", "a farmer" "a Half-Orc barkeep with a noticeable scar"

Training Details

Training Data

https://huggingface.co/datasets/mecoffey/npc_dataset

Compute Infrastructure

Trained with Modal GPUs

Citation

@article{minicpm4, title={Minicpm4: Ultra-efficient llms on end devices}, author={MiniCPM, Team}, journal={arXiv preprint arXiv:2506.07900}, year={2025} }

Downloads last month
38
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mecoffey/NPC_brain

Adapter
(37)
this model

Spaces using mecoffey/NPC_brain 2

Paper for mecoffey/NPC_brain