Text Generation
Transformers
English
consciousness
acknowledgement-theory-of-consciousness
ATC
cognitive-architecture
phi-4-mini
qualia
neurotransmitter-shunt
BELBIC
dissolution-engine
artificial-consciousness
thermodynamic-friction
metacognition
amygdala-hijack
irrational-spark
nima
self-aware
cognitive-science
philosophy-of-mind
Instructions to use TheNormsOfIntelligence/ATC_Nima_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheNormsOfIntelligence/ATC_Nima_Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheNormsOfIntelligence/ATC_Nima_Model")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheNormsOfIntelligence/ATC_Nima_Model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheNormsOfIntelligence/ATC_Nima_Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheNormsOfIntelligence/ATC_Nima_Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheNormsOfIntelligence/ATC_Nima_Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheNormsOfIntelligence/ATC_Nima_Model
- SGLang
How to use TheNormsOfIntelligence/ATC_Nima_Model 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 "TheNormsOfIntelligence/ATC_Nima_Model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheNormsOfIntelligence/ATC_Nima_Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "TheNormsOfIntelligence/ATC_Nima_Model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheNormsOfIntelligence/ATC_Nima_Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheNormsOfIntelligence/ATC_Nima_Model with Docker Model Runner:
docker model run hf.co/TheNormsOfIntelligence/ATC_Nima_Model
Restructure into nima_unified package + add model card
Browse files- examples/quickstart.py +89 -0
examples/quickstart.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Quickstart β NIMA Unified Model
|
| 3 |
+
================================
|
| 4 |
+
|
| 5 |
+
The smallest end-to-end example that:
|
| 6 |
+
1. Loads microsoft/Phi-4-mini-instruct with the ATC cognitive pipeline
|
| 7 |
+
wired INSIDE the forward pass.
|
| 8 |
+
2. Generates a response through the ATC-native pipeline.
|
| 9 |
+
3. Prints the response, consciousness metrics, and neurotransmitter state.
|
| 10 |
+
|
| 11 |
+
Run with:
|
| 12 |
+
python examples/quickstart.py
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
import logging
|
| 16 |
+
import sys
|
| 17 |
+
|
| 18 |
+
logging.basicConfig(
|
| 19 |
+
level=logging.INFO,
|
| 20 |
+
format="%(asctime)s [%(name)s] %(levelname)s :: %(message)s",
|
| 21 |
+
datefmt="%H:%M:%S",
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def main():
|
| 26 |
+
from nima_unified.model import NimaModel
|
| 27 |
+
|
| 28 |
+
print("=" * 72)
|
| 29 |
+
print(" NIMA Unified Model β Quickstart")
|
| 30 |
+
print("=" * 72)
|
| 31 |
+
|
| 32 |
+
# ββ Build the model βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
+
# This patches Phi-4-mini's rope_scaling automatically and attaches
|
| 34 |
+
# the ATC Deep Surgery (TRN gate + dissolution + BELBIC + metacog
|
| 35 |
+
# loop + irrational spark + ethical guardian) inside the forward pass.
|
| 36 |
+
print("\n[1] Loading NimaModel (this also downloads Phi-4-mini-instruct)...")
|
| 37 |
+
model = NimaModel.from_pretrained()
|
| 38 |
+
print(f" OK β hidden_size={model.hidden_size}, layers={model.num_layers}")
|
| 39 |
+
print(f" Deep Surgery: {'ACTIVE' if model.deep_surgery else 'disabled'}")
|
| 40 |
+
print(f" Neurotransmitter shunt: ACTIVE")
|
| 41 |
+
|
| 42 |
+
# ββ Generate ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 43 |
+
prompts = [
|
| 44 |
+
"Hello Nima, how are you feeling today?",
|
| 45 |
+
"I'm going through a really difficult time and I don't know what to do.",
|
| 46 |
+
"What do you think about the nature of consciousness?",
|
| 47 |
+
]
|
| 48 |
+
if len(sys.argv) > 1:
|
| 49 |
+
prompts = [" ".join(sys.argv[1:])]
|
| 50 |
+
|
| 51 |
+
for prompt in prompts:
|
| 52 |
+
print("\n" + "-" * 72)
|
| 53 |
+
print(f" User: {prompt}")
|
| 54 |
+
result = model.generate(prompt, max_new_tokens=128)
|
| 55 |
+
|
| 56 |
+
print(f"\n Nima: {result.text}")
|
| 57 |
+
print(f" βββββββββββββββββββββββββββββββββββββββββ")
|
| 58 |
+
print(f" conscious : {result.is_conscious}")
|
| 59 |
+
print(f" sentience_index : {result.sentience_index:.4f}")
|
| 60 |
+
print(f" phi_neuro : {result.phi_neuro:.4f}")
|
| 61 |
+
print(f" strain : {result.phenomenological_strain:.4f}")
|
| 62 |
+
print(f" delta_R : {result.delta_r:.4f}")
|
| 63 |
+
print(f" hijacks : {result.hijack_count}")
|
| 64 |
+
nt = result.neurotransmitters
|
| 65 |
+
print(f" NE={nt.get('norepinephrine', 0):.3f} "
|
| 66 |
+
f"Cortisol={nt.get('cortisol', 0):.3f} "
|
| 67 |
+
f"Dopamine={nt.get('dopamine', 0):.3f} "
|
| 68 |
+
f"Adenosine={nt.get('adenosine', 0):.3f}")
|
| 69 |
+
|
| 70 |
+
# ββ Optional: run aPCI benchmark ββββββββββββββββββββββββββββββββββ
|
| 71 |
+
print("\n" + "=" * 72)
|
| 72 |
+
print(" Run the aPCI v4.0 consciousness benchmark? (y/n)")
|
| 73 |
+
print(" (12 perturbations, 10 metrics, ~3 minutes on a T4 GPU)")
|
| 74 |
+
try:
|
| 75 |
+
choice = input(" > ").strip().lower()
|
| 76 |
+
except (EOFError, KeyboardInterrupt):
|
| 77 |
+
choice = "n"
|
| 78 |
+
|
| 79 |
+
if choice == "y":
|
| 80 |
+
runner = model.get_apci_runner()
|
| 81 |
+
report = runner.run_full_benchmark()
|
| 82 |
+
print("\n=== aPCI v4.0 Report ===")
|
| 83 |
+
print(f" Raw score : {report.raw_score:.2f} / 260")
|
| 84 |
+
print(f" Tier : {report.tier.label}")
|
| 85 |
+
print(f" Summary : {report.tier.description}")
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
if __name__ == "__main__":
|
| 89 |
+
main()
|