Downloads · 30 days
134
4% of all-time downloads
RichardErkhov/Gigax_-_NPC-LLM-7B-gguf
Gigax_-_NPC-LLM-7B-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
134
4% of all-time downloads
All-time downloads
3.4K
Public
Repo size
82.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf95.2 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
NPC-LLM-7B - GGUF
| Name | Quant method | Size |
|---|---|---|
| NPC-LLM-7B.Q2_K.gguf | Q2_K | 2.53GB |
| NPC-LLM-7B.IQ3_XS.gguf | IQ3_XS | 2.81GB |
| NPC-LLM-7B.IQ3_S.gguf | IQ3_S | 2.96GB |
| NPC-LLM-7B.Q3_K_S.gguf | Q3_K_S | 2.95GB |
| NPC-LLM-7B.IQ3_M.gguf | IQ3_M | 3.06GB |
| NPC-LLM-7B.Q3_K.gguf | Q3_K | 3.28GB |
| NPC-LLM-7B.Q3_K_M.gguf | Q3_K_M | 3.28GB |
| NPC-LLM-7B.Q3_K_L.gguf | Q3_K_L | 3.56GB |
| NPC-LLM-7B.IQ4_XS.gguf | IQ4_XS | 3.67GB |
| NPC-LLM-7B.Q4_0.gguf | Q4_0 | 3.83GB |
| NPC-LLM-7B.IQ4_NL.gguf | IQ4_NL | 3.87GB |
| NPC-LLM-7B.Q4_K_S.gguf | Q4_K_S | 3.86GB |
| NPC-LLM-7B.Q4_K.gguf | Q4_K | 4.07GB |
| NPC-LLM-7B.Q4_K_M.gguf | Q4_K_M | 4.07GB |
| NPC-LLM-7B.Q4_1.gguf | Q4_1 | 4.24GB |
| NPC-LLM-7B.Q5_0.gguf | Q5_0 | 4.65GB |
| NPC-LLM-7B.Q5_K_S.gguf | Q5_K_S | 4.65GB |
| NPC-LLM-7B.Q5_K.gguf | Q5_K | 4.78GB |
| NPC-LLM-7B.Q5_K_M.gguf | Q5_K_M | 4.78GB |
| NPC-LLM-7B.Q5_1.gguf | Q5_1 | 5.07GB |
| NPC-LLM-7B.Q6_K.gguf | Q6_K | 5.53GB |
| NPC-LLM-7B.Q8_0.gguf | Q8_0 | 7.17GB |
license: apache-2.0 language:
This repo contains the domain-specific NPC model we've fined-tuned from Mistral-7B, using LoRA.
This model parses a text description of a game scene, and outputs commands like:
say <player1> "Hello Adventurer, care to join me on a quest?greet <player1>attack <player1><action> <param> you add to the prompt! (We call these "skills"!)⚠️ This model has been trained to overfit on our input prompt format. Follow it closely to reach optimal performance ⚠️
Make your life easier, use our Python client library
from outlines import models
from gigax.step import NPCStepper
# Download model from the Hub
model_name = "Gigax/NPC-LLM-7B"
llm = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Our stepper takes in a Outlines model to enable guided generation
# This forces the model to follow our output format
model = models.Transformers(llm, tokenizer)
# Instantiate a stepper: handles prompting + output parsing
stepper = NPCStepper(model=model)
from gigax.parse import CharacterAction
from gigax.scene import (
Character,
Item,
Location,
ProtagonistCharacter,
ProtagonistCharacter,
Skill,
ParameterType,
)
# Use sample data
context = "Medieval world"
current_location = Location(name="Old Town", description="A quiet and peaceful town.")
locations = [current_location] # you can add more locations to the scene
NPCs = [
Character(
name="John the Brave",
description="A fearless warrior",
current_location=current_location,
)
]
protagonist = ProtagonistCharacter(
name="Aldren",
description="Brave and curious",
current_location=current_location,
memories=["Saved the village", "Lost a friend"],
quests=["Find the ancient artifact", "Defeat the evil warlock"],
skills=[
Skill(
name="Attack",
description="Deliver a powerful blow",
parameter_types=[ParameterType.character],
)
],
psychological_profile="Determined and compassionate",
)
items = [Item(name="Sword", description="A sharp blade")]
events = [
CharacterAction(
command="Say",
protagonist=protagonist,
parameters=[items[0], "What a fine sword!"],
)
]
action = stepper.get_action(
context=context,
locations=locations,
NPCs=NPCs,
protagonist=protagonist,
items=items,
events=events,
)
Here's a sample input prompt, showing you the format on which the model has been trained:
- WORLD KNOWLEDGE: A vast open world full of mystery and adventure.
- KNOWN LOCATIONS: Old Town
- NPCS: John the Brave
- CURRENT LOCATION: Old Town: A quiet and peaceful town.
- CURRENT LOCATION ITEMS: Sword
- LAST EVENTS:
Aldren: Say Sword What a fine sword!
- PROTAGONIST NAME: Aldren
- PROTAGONIST PSYCHOLOGICAL PROFILE: Brave and curious
- PROTAGONIST MEMORIES:
Saved the village
Lost a friend
- PROTAGONIST PENDING QUESTS:
Find the ancient artifact
Defeat the evil warlock
- PROTAGONIST ALLOWED ACTIONS:
Attack <character> : Deliver a powerful blow
Aldren:
@misc{NPC-LLM-7B,
url={[https://huggingface.co/Gigax/NPC-LLM-7B](https://huggingface.co/Gigax/NPC-LLM-7B)},
title={NPC-LLM-7B},
author={Gigax team}
}