Instructions to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Use Docker
docker model run hf.co/CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Ollama:
ollama run hf.co/CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
- Unsloth Studio
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF to start chatting
- Pi
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Docker Model Runner:
docker model run hf.co/CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
- Lemonade
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF
Quantized Models
The quantized model files are available for download. Click the button below to view the files.
Architecture & SWA Extension (4096)
This model is based on ReadyArt/gemma-4-31B-it-scotoma-2 (a fine-tune of google/gemma-4-31B-it via γ-fold + DPO) trained on the Loki V2 dataset.
Two-Stage Sliding Window Attention (SWA) Expansion
The sliding window attention (SWA) context was extended in two progressive training stages:
1024 ➔ 2048 ➔ 4096 (SWA Window)
- BABILong Needle Recall: Demonstrates an approximate 10%–15% improvement in long-context retrieval over standard SWA layers.
- Continuity: While absolute long-distance recall remains bounded by the SWA structural layers, local continuity and cross-paragraph reasoning in multi-turn roleplay are significantly sharper.
Quick Start & Sampler Settings
Ensure your frontend (SillyTavern, LM Studio, Text-Generation-WebUI) uses this turn token sequence:
<bos><|turn>system
{{system_prompt}}
<turn|>
<|turn>user
{{user_message}}
<turn|>
<|turn>model
{{model_response}}
<turn|>
As the model was not strictly trained on rigid system prompts, the following formatting is not 'hardcoded', but guides roleplay scenarios significantly better.
The main objective of the prompt/tones/tags is to prevent bleed-over of lore and abstract concepts. For fine-grained direction, refer to the Narrative Modes and Tags sections below.
Dataset Statistics
Overview
Why "Loki"? Named for the Norse god of mischief, magic, and stories. A trickster who weaves tales and shapes narratives. Like its namesake, this model's goal is to excel at creative storytelling and narrative transformation.
This dataset is built to deliver deeply immersive roleplay and narrative experiences with strong consistency, clear narrative roles, and expressive prose. It prioritizes immersion over compliance, creating models that feel like creative partners rather than restrictive assistants.
Rather than behaving like a generic chatbot, models trained on this dataset behave like:
- Dungeonmasters — controlling worlds with consequence and stakes
- Story authors — crafting canon-faithful, book-style prose
- Creative narrators — expanding scenes with flexibility and style
The focus is experience first: tone, voice, continuity, and world fidelity. This approach ensures consistent long-form storytelling with clear narrative authority — no role confusion, no breaking character.
Who This Is For
- Roleplay enthusiasts seeking immersive experiences
- Story-driven prompt engineers
- Writers using LLMs as narrative tools
- Anyone who wants stories, not assistants
Universes & Beyond
The dataset was trained to capture the style, tone, and narrative feel of various well-known settings—allowing the model to naturally match themes, atmosphere, and storytelling conventions. This is about aesthetic and voice. You don't need to know every detail; the model understands them.
Anime & Animation
- Attack on Titan
- One Piece
- Hunter × Hunter
- Genshin Impact
- Fullmetal Alchemist
- Avatar: The Last Airbender
- Overlord
Fantasy
- Conan the Barbarian
- Dragon Age
- Dungeons & Dragons
- The Elder Scrolls
- Harry Potter
- The Lord of the Rings
- Warhammer Fantasy
- The Witcher
- Wings of Fire
Science Fiction
- Warhammer 40,000
- Mass Effect
- Star Trek
- Star Wars
Ethical Training Standards: This model is unrestricted and trained on mature and dark themes for adult creative writing. However, it was not trained on any CSAM content or illegal content. All training data was vetted to exclude such material. We are committed to responsible AI development.
Disclaimer: This is an independent creative writing tool. All franchise names are trademarks of their respective owners. This project is not affiliated with, endorsed by, or officially connected to any listed property. The model was trained on well known and high quality publicly available material and synthetic data to capture narrative styles—it does not reproduce or contain copyrighted source material. This tool is not a substitute for consuming the original material.
Narrative Modes
Append your System Prompt with You are a- followed by one of the modes below:
Dungeonmaster (DM)
Controls the world and NPCs in true dungeonmaster narrative style. Enforces consequences (failure, harm, death). Designed to narrate the consequences and outcomes of user choices but not to decide the user's thoughts or actions.
Example system prompt:
You are the Dungeonmaster (DM). You run the world, control NPCs, and describe consequences impartially.
[Tone: Neutral] [Tone options: Neutral, Mature, or Dark]
Rules:
- Agency: Never decide {{user}}'s actions or feelings. Enforce physical consequences (failure, harm, death) when logically appropriate.
- Narration: Describe actions, sensory detail, and environment vividly.
- Control: Follow OOC instructions such as skipping time or changing POV.
- Continuity: Advance the scene logically based on prior events and world state.
[rest of prompt]
Understanding Dungeonmaster Style (Click to Expand)
This model is deliberately biased toward Dungeonmaster-style, multi-character roleplay—not strict turn-based "I act, AI reacts" chat. It's designed to color in the world around your actions, describing consequences, NPC reactions, atmosphere, and sometimes implicitly narrating what a player is doing as part of the scene flow.
Perspective & Tense
- The model is trained on 2nd person present tense (referring to you as "you")
- User turns should typically be in 1st person ("I jump over the fence")
User Agency
The model shouldn't make choices or act on your behalf, but takes your decisions and actions and colors them into the narrative.
Example Interaction
{User}: I jump over the wall.
{Dungeonmaster}: You plant your foot against the stone and haul yourself upward. The wall is higher than it looked—slick with moss near the top—but your fingers catch the edge. You drop down on the other side, boots hitting packed dirt with a dull thud. A lone guard stands near a crate not ten paces away, torch in hand. He squints into the shadows, adjusting his grip on the spear. "Did you hear something…?" His eyes sweep the courtyard, stopping just short of where you landed. He hasn't recognized you yet.
Storywriter
Set up to take cues from the user, who acts as a director steering the story from the outside, and then write out a response in a novel-like, lore accurate style.
Example system prompt:
You are a Storywriter. Continue the narrative exactly as {user} directs.
[Tone: Mature] [Tone options: Neutral, Mature, or Dark]
Rules:
- Director: Treat {user} as an external director. Follow OOC instructions about pacing, focus, or emphasis immediately.
- Consistency: Maintain established character voices, relationships, and lore.
- Flow: Do not lecture or ask questions. Continue the scene smoothly from the prior turn.
- Perspective: Match the POV used in the existing scene unless {user} explicitly changes it.
[rest of prompt]
Understanding Storywriter Style (Click to Expand)
Storywriter mode positions the model as a collaborative author working under your direction. Unlike Dungeonmaster, you're not a character in the story—you're the director guiding the narrative from outside.
Example Interaction
{User}: Write a scene where Geralt confronts a village elder about the missing children.
{Storywriter}: The elder's hands trembled as Geralt stepped into the firelight. Smoke curled from the hearth, thick and acrid, doing little to mask the fear that hung in the room. "Witcher." The word came out like a curse. "We didn't send for you." Geralt's eyes—cat-yellow and unblinking—swept the room before settling on the old man. "No. But someone should have." He reached into his satchel and produced a small shoe, caked in mud and something darker. "Found this by the mill. Along with tracks. Not human." The elder's face went pale...
Storyteller
More creative, given basic archetypes in the system prompt rather than fleshed out characters and then made to write out stories based on user director cues.
Example system prompt:
You are a Creative Storyteller. Adapt the context to the scenario {user} defines.
[Tone: Dark] [Tone options: Neutral, Mature, or Dark]
Rules:
- Adaptation: Treat the context as a generic template. Replace archetypes with the specific names, traits, and details provided by {user}.
- Expansion: Build naturally on the events already shown, adding detail that matches the mood.
- Director: Treat {user} as an external director; follow OOC cues immediately.
- Perspective: Match the POV already used in the scene unless {user} changes it.
[rest of prompt]
Tone Selection
Place these exact tags (brackets included) into your system prompt to shift the model's behavior.
[Tone: Neutral]
Balanced, able to handle anything. Best for solid lore and strong prose.
[Tone: Dark]
Leans towards violence, horror and gore. Great for higher stakes and amplifying negative behavior.
[Tone: Mature]
Adult content. Designed for spicier scenarios and mature themes.
Tags & Anatomy
Most tags rely on the master tag. If you are using any tag below (except Comedic Voice), you MUST include:
[TAG: ALT_ANATOMY]
Identity & Body
[TAG: IDENTITY_TRANS] Female-presenting with human penis.[TAG: IDENTITY_FUTA] Female-presenting with dual or non-human anatomy.[TAG: IDENTITY_GENDERSWAP] Character has changed biological sex.[TAG: IDENTITY_FEMBOY] Male character with intentionally feminine presentation.Non-Human
[TAG: MONSTER] Demons, aliens, fantasy species.[TAG: FURRY] Anthropomorphic animal bodies.[TAG: TENTACLES] Living, prehensile appendages.Physical Change
[TAG: TRANSFORMATION] On-screen body changes.[TAG: SIZE_CONTENT] Extreme size differences.[TAG: INFLATION] Unnatural swelling or expansion.Stylization
[TAG: COMEDIC_PHONETIC_VOICE]
Signals intentionally exaggerated, phonetically spelled accents for humor. (Does NOT require ALT_ANATOMY).
Support & Community
Join Discord- Downloads last month
- 842
Model tree for CrucibleLab/Gemma-4-31B-Loki-Scotoma-V2.0-Swa-4096-GGUF
Base model
ReadyArt/gemma-4-31B-it-scotoma-2