Views
No views yet
| 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 |
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"!)1from outlines import models
2from gigax.step import NPCStepper
3
4# Download model from the Hub
5model_name = "Gigax/NPC-LLM-7B"
6llm = AutoModelForCausalLM.from_pretrained(model_name)
7tokenizer = AutoTokenizer.from_pretrained(model_name)
8
9# Our stepper takes in a Outlines model to enable guided generation
10# This forces the model to follow our output format
11model = models.Transformers(llm, tokenizer)
12
13# Instantiate a stepper: handles prompting + output parsing
14stepper = NPCStepper(model=model)1from gigax.parse import CharacterAction
2from gigax.scene import (
3 Character,
4 Item,
5 Location,
6 ProtagonistCharacter,
7 ProtagonistCharacter,
8 Skill,
9 ParameterType,
10)
11# Use sample data
12context = "Medieval world"
13current_location = Location(name="Old Town", description="A quiet and peaceful town.")
14locations = [current_location] # you can add more locations to the scene
15NPCs = [
16 Character(
17 name="John the Brave",
18 description="A fearless warrior",
19 current_location=current_location,
20 )
21]
22protagonist = ProtagonistCharacter(
23 name="Aldren",
24 description="Brave and curious",
25 current_location=current_location,
26 memories=["Saved the village", "Lost a friend"],
27 quests=["Find the ancient artifact", "Defeat the evil warlock"],
28 skills=[
29 Skill(
30 name="Attack",
31 description="Deliver a powerful blow",
32 parameter_types=[ParameterType.character],
33 )
34 ],
35 psychological_profile="Determined and compassionate",
36)
37items = [Item(name="Sword", description="A sharp blade")]
38events = [
39 CharacterAction(
40 command="Say",
41 protagonist=protagonist,
42 parameters=[items[0], "What a fine sword!"],
43 )
44]
45
46action = stepper.get_action(
47 context=context,
48 locations=locations,
49 NPCs=NPCs,
50 protagonist=protagonist,
51 items=items,
52 events=events,
53)1- WORLD KNOWLEDGE: A vast open world full of mystery and adventure.
2- KNOWN LOCATIONS: Old Town
3- NPCS: John the Brave
4- CURRENT LOCATION: Old Town: A quiet and peaceful town.
5- CURRENT LOCATION ITEMS: Sword
6- LAST EVENTS:
7Aldren: Say Sword What a fine sword!
8- PROTAGONIST NAME: Aldren
9- PROTAGONIST PSYCHOLOGICAL PROFILE: Brave and curious
10- PROTAGONIST MEMORIES:
11Saved the village
12Lost a friend
13- PROTAGONIST PENDING QUESTS:
14Find the ancient artifact
15Defeat the evil warlock
16- PROTAGONIST ALLOWED ACTIONS:
17Attack <character> : Deliver a powerful blow
18Aldren:1@misc{NPC-LLM-7B,
2 url={[https://huggingface.co/Gigax/NPC-LLM-7B](https://huggingface.co/Gigax/NPC-LLM-7B)},
3 title={NPC-LLM-7B},
4 author={Gigax team}
5}