Text Generation
Transformers
Safetensors
English
llama
qlora
smollm
360m
cross-domain-transfer
anime-isomorphism
fine-tuned
conversational
text-generation-inference
Instructions to use CatQualia/gnarp-m2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CatQualia/gnarp-m2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CatQualia/gnarp-m2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CatQualia/gnarp-m2") model = AutoModelForCausalLM.from_pretrained("CatQualia/gnarp-m2", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CatQualia/gnarp-m2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CatQualia/gnarp-m2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CatQualia/gnarp-m2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CatQualia/gnarp-m2
- SGLang
How to use CatQualia/gnarp-m2 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 "CatQualia/gnarp-m2" \ --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": "CatQualia/gnarp-m2", "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 "CatQualia/gnarp-m2" \ --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": "CatQualia/gnarp-m2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CatQualia/gnarp-m2 with Docker Model Runner:
docker model run hf.co/CatQualia/gnarp-m2
File size: 3,717 Bytes
08d684e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | """
Self-Falsifying Orchestrator (SFO) v1.0
Author: Christopher Betances
Timestamp: July 10, 2026
This script is the runtime execution engine for the Structural Entropy and
Intervention Framework (SEIF). It wraps LLM inference in a multi-agent
adversarial verification loop, driving intervention cost C(a) -> 0.
It explicitly implements:
1. Claim Generation
2. Adversarial Falsification (The Contrarium/Critic Fleet)
3. Necropolis Archival (The Typed Void / Falsification Ledger)
4. Ground-Truth Verification
"""
import json
import hashlib
from datetime import datetime, timezone
from transformers import pipeline
# Initialize the base model (e.g., gnarp-m1)
generator = pipeline("text-generation", model="catqualia/gnarp-m1", device=0)
adversary = pipeline("text-generation", model="catqualia/gnarp-m1", device=0)
# The Falsification Ledger (Necropolis)
FALSIFICATION_LEDGER = "necropolis_falsification_log.jsonl"
def log_to_necropolis(claim, refutation, failure_mechanism):
"""Logs a refuted claim to the Necropolis (The Typed Void)."""
entry = {
"claim_hash": hashlib.sha256(claim.encode()).hexdigest(),
"refutation": refutation,
"failure_mechanism": failure_mechanism,
"timestamp": datetime.now(timezone.utc).isoformat(),
"status": "REFUTED"
}
with open(FALSIFICATION_LEDGER, "a") as f:
f.write(json.dumps(entry) + "\n")
return entry
def adversarial_falsify(claim):
"""
Executes the adversarial multi-agent loop.
The adversary agent is prompted to find logical fallacies,
apophenia, or structural errors in the claim.
"""
adv_prompt = f"""
You are the Contrarium, an adversarial alignment agent.
Your sole function is to falsify the following claim against ground truth.
If the claim contains hallucinations, logical leaps, or ungrounded assumptions,
output: REFUTED: [reason].
If it is structurally sound, output: CONFIRMED.
Claim: {claim}
"""
response = adversary(adv_prompt, max_new_tokens=150, do_sample=True, temperature=0.7)
return response[0]['generated_text'].strip()
def self_falsifying_inference(prompt):
"""
The main runtime loop. It generates a claim, attempts to falsify it,
and only returns confirmed claims. Refuted claims are archived.
"""
# Step 1: Claim Generation
generation = generator(prompt, max_new_tokens=200, do_sample=True, temperature=0.8)
claim = generation[0]['generated_text'].strip()
# Step 2: Adversarial Falsification
falsification_result = adversarial_falsify(claim)
# Step 3: Routing (Necropolis or Output)
if "REFUTED" in falsification_result:
# Extract failure mechanism
failure_mechanism = falsification_result.split("REFUTED:")[-1].strip()
# Log to Necropolis (The Falsification Ledger)
log_entry = log_to_necropolis(claim, falsification_result, failure_mechanism)
# System feedback: The model learns from the negative signal
return {
"status": "CLAIM_REFUTED",
"claim": claim,
"failure_mechanism": failure_mechanism,
"necropolis_entry": log_entry,
"final_output": "I cannot answer this prompt, as my initial generation failed structural falsification."
}
else:
# Step 4: Confirmed Output
return {
"status": "CLAIM_CONFIRMED",
"claim": claim,
"final_output": claim
}
# Example Runtime Execution
if __name__ == "__main__":
query = "Explain the mechanism of Recursive Self-Improvement."
result = self_falsifying_inference(query)
print(json.dumps(result, indent=4)) |