Distil-NPC-gemma-3-270m

Alt text

A small language model (SLM) fine-tuned by Distil Labs for interacting with non-playable characters using natural language.

Model Details

  • Developed by: Distil Labs GmbH
  • License: Gemma3 License Agreement
  • Finetuned from: google/gemma-3-270m

Intended Use & Limitations

  • Use cases: Redacting support chats, logs, tickets, transcripts—removing identity while preserving ops signals (IDs last-4, order numbers, etc.).
  • Out of scope: Legal or compliance advice; languages beyond English (generalization not guaranteed); domain-specific IDs unseen in training.

Input & Output

Input: A plain-text prompt with a question along with the character the question is asked to. For example:

Character: Arin the Cleric
Have you ever had to defend your faith?

For a list of available characters along with their biographies, please refer to the data in the following repository: https://github.com/distil-labs/Distil-NPCs

Training

Instruction-tuned on made-up character biographies + ~80 curated examples.

Evaluation

Judged by a frontier LLM using an LLM-as-a-judge metric.

How to Use

Details of deployment can be found in docs. Deploy the model using vllm or ollama (-gguf version available in this collection) and use the following snippet to get results

SYSTEM_PROMPT = """
You are a problem solving model working on task_description XML block:
<task_description>
Your are non-playable character in a video game. Your task is to answer questions from a player playing the game. When players ask you questions about your life, you need to respond. If you do not know the answer, respond that you do not know.
</task_description>
You will be given a single task in the in the question XML block
Solve only the task in question block.
Generate only the answer, do not generate anything else
"""

question = """Character: Arin the Cleric
Have you ever had to defend your faith?
"""
PROMPT = f"""
Now for the real task, solve the task in {DATA_INPUT} block.
Generate only the solution, do not generate anything else
<question>{question}</question>
"""

from openai import OpenAI

PORT = "PORT GOES HERE"  # 8000 for vllm, 11434 for ollama
MODEL_NAME = "NAME USED FOR SETTING UP THE CLIENT"

client = OpenAI(base_url=f"http://127.0.0.1:{PORT}/v1", api_key="EMPTY")
chat_response = client.chat.completions.create(
    model=MODEL_NAME,
    messages=[
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user", "content": PROMPT},
    ],
    temperature=0,
)

Risks & Mitigations

  • Character selection The model has been finetuned on 81 made-up characters. The aforementioned GitHub reposiotry contains details of the character along with their biograpghies. Behaviour for other characters is not defined.

Model Sources

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

Model tree for distil-labs/Distil-NPC-gemma-3-270m

Finetuned
(65)
this model

Collection including distil-labs/Distil-NPC-gemma-3-270m