Text Generation
PEFT
Safetensors
Transformers
llama
lora
sft
trl
conversational
text-generation-inference
Instructions to use mecoffey/NPC_brain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mecoffey/NPC_brain with PEFT:
Task type is invalid.
- Transformers
How to use mecoffey/NPC_brain with Transformers:
# 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mecoffey/NPC_brain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mecoffey/NPC_brain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mecoffey/NPC_brain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mecoffey/NPC_brain
- SGLang
How to use mecoffey/NPC_brain 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 "mecoffey/NPC_brain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mecoffey/NPC_brain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "mecoffey/NPC_brain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mecoffey/NPC_brain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mecoffey/NPC_brain with Docker Model Runner:
docker model run hf.co/mecoffey/NPC_brain
| base_model: openbmb/MiniCPM5-1B | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| tags: | |
| - base_model:adapter:openbmb/MiniCPM5-1B | |
| - lora | |
| - sft | |
| - transformers | |
| - trl | |
| # 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 | |
| - **Developed by:** mecoffey | |
| - **Model type:** Causal Language Model | |
| - **Language:** English | |
| - **License:** apache-2.0 | |
| - **Finetuned from model:** https://huggingface.co/openbmb/MiniCPM5-1B | |
| - **Total Parameters after fine-tune** 1,080,632,832 | |
| ### 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} | |
| } | |