Downloads · 30 days
25
5% of all-time downloads
ninacatcoin/nina-model
nina-model is a text generation model from ninacatcoin. Use it when you need the model to write or continue text. The card lists the license as llama3.2.
NINA (NinaCatCoin Intelligent Node Assistant) is a fine-tuned Llama 3.2 3B model that runs directly inside the NinaCatCoin daemon binary. The daemon links against libllama (llama.cpp) at compile time, loads the GGUF m…
Downloads · 30 days
25
5% of all-time downloads
All-time downloads
527
Public
Repo size
4.1 GB
Likes
1
Public
Click a slice to open those files.
.gguf2 GB · 100%
From the Hugging Face model README
NINA (NinaCatCoin Intelligent Node Assistant) is a fine-tuned Llama 3.2 3B model that runs directly inside the NinaCatCoin daemon binary. The daemon links against libllama (llama.cpp) at compile time, loads the GGUF model into RAM, and performs inference in-process — no external server, no HTTP, no child process.
NINA is the central intelligence of a 34-module AI system embedded in the daemon, organized in 6 tiers of autonomous learning and decision-making.
llama_model_load_from_file() to load the model into RAM (~2 GB).NinaLLMEngine tokenizes events, runs llama_decode() + llama_sampler_sample() in-process, and parses the output.libllama and libggml (linked at build time).// From src/daemon/CMakeLists.txt:
target_link_libraries(daemon PRIVATE ... llama ggml ...)
// From src/daemon/nina_llm_engine.cpp:
#include "llama.h"
m_model = llama_model_load_from_file(path, params);
m_ctx = llama_init_from_model(m_model, ctx_params);
llama_token t = llama_sampler_sample(m_sampler, m_ctx, -1);
| Module | What it does |
|---|---|
| NinaLLMEngine | Loads and runs this GGUF model in-process via llama.cpp C API. Three modes: active (always in RAM), lazy (load on demand), disabled (embedded ML only). |
| NinaDecisionEngine | The "brain" — evaluates network events and decides actions via the LLM. Pipeline: NinaEvent → evaluate() → vector<NinaAction>. Uses temp=0.0 (greedy) for deterministic consensus. Rare events go to LLM; frequent events go to embedded ML. |
| NinaLLMBridge | Connects all existing NINA modules to the LLM. Methods like enhance_* take module output and return LLM-enriched versions. Non-blocking: if LLM unavailable, modules work as before. |
| NinaLLMFirewall | Hardcoded security filter for all LLM I/O. Blocks prompt injection attacks on input. Sanitizes output to strip wallet addresses, private keys, transfer instructions. No config, no bypass — only recompilation. |
| Module | What it does |
|---|---|
| NinaConstitution | Immutable governance constraints enforced at compile time via static_assert. Article 0: NINA cannot create/sign transactions, access wallets, or move funds. Also: no censorship, no history rewrite, user autonomy always respected. |
| NinaModelValidator | Validates GGUF model integrity via SHA-256 hash at startup. Chunk-based hashing (4 MB). Sanity checks file size. Hash injected into coinbase tag 0xCA. |
| NinaModelDownloader | Auto-downloads the model on first run using libcurl with resume support, retries (up to 3), and progress display. Primary: HuggingFace. Fallback: GitHub Releases. Atomic rename after validation. |
| Module | What it does |
|---|---|
| NinaNodeProtector | Immune system — detects, isolates, diagnoses, recovers, and reintegrates attacked nodes. State machine: HEALTHY → UNDER_ATTACK → ISOLATED → RECOVERING → REINTEGRATING. Handles: Sybil flood, output poisoning, eclipse, difficulty manipulation, mempool flood, block withholding. |
| NinaSybilDetector | Identifies coordinated Sybil peers via temporal correlation, latency analysis, response timing, and block propagation patterns. Clusters statistically similar peers and flags excessive correlation. |
| NinaSpyCountermeasures | Active countermeasures against spy nodes (based on "Friend or Foe" 2025 paper). 5 techniques: selective TX relay, delayed relay, peer list cloaking, spy-aware Dandelion++ routing, coordinated banning. Destroys timing analysis. |
| NinaNetworkHealthMonitor | Monitors network condition: latency, connectivity, orphaned blocks, reorgs, propagation, throughput, hashrate. Diagnoses: OPTIMAL / DEGRADED / STRESSED / CRITICAL. Produces trust score 0.0–1.0. |
| Module | What it does |
|---|---|
| NinaGovernanceEngine | Generates governance proposals with justification, expected impact, and affected systems. Status tracking: PROPOSED → VOTING → APPROVED/REJECTED. NINA suggests, humans decide. |
| NinaConsensusTuner | Analyzes network conditions and proposes consensus adjustments with confidence scores and rationale. Continuous monitoring loop with configurable conservatism level (1-5). |
| NinaParameterAdjustor | Dynamic adjustment of: quorum %, block time, difficulty multiplier, pool size, block size limit, peer timeout (10 parameter types total). Each adjustment includes old/new value, confidence, and reason. |
| NinaSuggestionEngine | Generates typed security recommendations (attack mitigation, peer isolation, consensus protection, optimization, hardening). Every suggestion requires human approval. |
| Module | What it does |
|---|---|
| NinaExplanationEngine | Every NINA decision is justified and traceable. Generates DecisionExplanation with reasoning, evidence, constraints applied, and escalation level. Builds trust through total transparency. |
| Module | What it does |
|---|---|
| NinaAdaptiveLearning | Tracks attack patterns with feature vectors, confidence, and threat levels. Generates predictions about future network conditions with accuracy tracking. Learns progressively while maintaining constitutional alignment. |
| NinaLearningModule | Statistical learning: metrics with running mean, variance, std deviation, min/max, sample count. Statistical anomaly detection with configurable thresholds. Serializable for LMDB persistence. |
| NinaMemorySystem | Long-term memory for attack patterns and peer behavior. AttackPattern: name, occurrences, confidence, severity, first/last seen. PeerBehavior: IP, interactions, suspicion count, reputation score. |
| Module | What it does |
|---|---|
| NinaHumanCollaboration | Human-AI interface for critical decisions. EscalationRequest with options, NINA's recommendation, and urgency level. Callback-based: registers handlers for human input. Blocks until response on critical issues. |
| Module | What it does |
|---|---|
| NinaRingEnhancer | Intelligent decoy selection for ring signatures. Adaptive Spending Model (ASM) replaces static gamma distribution. Ring Quality Score (RQS) 0.0–1.0; wallet retries if below threshold. Poison avoidance and cross-TX independence. |
| NinaRingController | Active ring parameter control post-v18. Threat-based sizing: NORMAL→16, ELEVATED→21, HIGH→26, CRITICAL→31 ring members. Deterministic across nodes via blockchain inputs; verified via coinbase tag 0xCB. |
| Module | What it does |
|---|---|
| NinaSmartMempool | Intelligent mempool analysis: priority scoring (fee/byte), spam vs legitimate bot detection, health monitoring, source reputation tracking. Never rejects transactions — only re-orders priority. |
| Module | What it does |
|---|---|
| NinaNetworkOptimizer | Intelligent P2P connection management. Peer quality scoring (latency, reliability, version, chain height). Auto-adjusts peer count based on available bandwidth. Prioritizes full-chain nodes during sync. |
| Module | What it does |
|---|---|
| NinaPersistenceEngine | Long-term storage: DecisionRecord, GovernanceProposalRecord, LearningPatternRecord. On-chain support post-v18 via BlockchainDB. Full audit trail (timestamp, reasoning, evidence, outcome). |
| NinaPersistentMemory | ACID-compliant LMDB storage, crash-safe. Dual-mode: pre-v18 → separate LMDB in ~/.ninacatcoin/nina_state/; post-v18 → blockchain's data.mdb. Auto-routes to correct backend by height. |
| NinaPersistenceAPI | Simplified high-level API: log_block_validation_decision(), log_checkpoint_validation_decision(). Creates complete DecisionRecord with evidence, reasoning, confidence. |
| Module | What it does |
|---|---|
| NinaBlockDataLogger | Logs real block data to CSV for ML training: height, timestamp, solve_time, difficulty, tx_count, block_size. Output: ~/.ninacatcoin/ml_training_data.csv. Thread-safe append. |
| NinaIAAutoUpdate | Autonomous daemon updates: monitors GitHub, classifies changes (hard fork, security fix, performance), decides when to update (immediate/scheduled/pre-fork), compiles, installs, and restarts without human intervention. |
| Module | What it does |
|---|---|
| NinaAdvancedInline | Main entry point — creates global g_nina_advanced_ai coordinator at daemon startup. Includes and orchestrates all 6 tiers. Handles model download and all subsystem initialization. |
| NinaAdvancedService | Integration example showing how the 6 tiers work together. Feeds block data to modules, queries network intelligence, sends alerts to Discord. |
| NinaCompleteEvolution | Unified framework orchestrating all 6 tiers. Tracks: predictions accuracy, anomalies detected, attacks prevented, governance proposals, human escalations. |
| NinaMLClient | C++ client communicating with Python ML service via JSON/TCP sockets. Phase 1: block validation, Phase 2: LWMA difficulty, Phase 3: Sybil detection, Phase 4: gas optimization. |
| Field | Value |
|---|---|
| Base model | Llama-3.2-3B-Instruct (via unsloth) |
| Fine-tuning | QLoRA r=32, alpha=64, dropout=0.05, 7 target modules |
| Epochs | 3 (1,419 steps) |
| Dataset | 3,980 blockchain-specific Q&A pairs (multilingual: EN/ES/FR/DE/PT) |
| Quantization | Q4_K_M (4.5 bits per weight) |
| File size | 1.89 GB (2,030,731,360 bytes) |
| SHA-256 | 416ef260f5f2607d990c92c5517ef0cf60a3e296c02421e4fba8ff34385e7438 |
| Training date | 2026-03-11 |
| Training hardware | NVIDIA GTX 1080 Ti (11 GB VRAM) |
| Training time | 2h 43min |
| Final training loss | 0.5416 |
| Final token accuracy | 89.0% |
| Eval loss | 0.7032 |
ninacatcoind (single binary, ~34 AI modules compiled in)
│
├─ Blockchain Core (validation, sync, consensus)
├─ P2P Network (peer management, Dandelion++)
│
└─ NINA AI System (in-process, 6 tiers)
│
├─ NinaLLMEngine ← libllama + libggml (linked at build time)
│ └─ nina_model.gguf (loaded into RAM at startup)
│
├─ NinaDecisionEngine (event → LLM → action)
├─ NinaLLMFirewall (I/O security filter)
├─ NinaConstitution (compile-time safety)
│
├─ TIER 1-2: Security
│ ├─ NinaNodeProtector (immune system)
│ ├─ NinaSybilDetector (coordinated peer detection)
│ ├─ NinaSpyCountermeasures (anti-surveillance)
│ └─ NinaNetworkHealthMonitor (diagnostics)
│
├─ TIER 3: Governance
│ ├─ NinaGovernanceEngine (proposals)
│ ├─ NinaConsensusTuner (dynamic adjustment)
│ ├─ NinaParameterAdjustor (10 network params)
│ └─ NinaSuggestionEngine (recommendations)
│
├─ TIER 4: Explainability
│ └─ NinaExplanationEngine (decision justification)
│
├─ TIER 5: Learning
│ ├─ NinaAdaptiveLearning (pattern tracking)
│ ├─ NinaLearningModule (statistical anomalies)
│ └─ NinaMemorySystem (attack memory)
│
├─ TIER 6: Human Collaboration
│ └─ NinaHumanCollaboration (escalation interface)
│
├─ Privacy: NinaRingEnhancer + NinaRingController
├─ Mempool: NinaSmartMempool
├─ Network: NinaNetworkOptimizer
├─ Persistence: LMDB (pre-v18) / on-chain (post-v18)
└─ Auto-update: NinaIAAutoUpdate (GitHub monitoring)
The dataset covers 8 specialized domains built from real NinaCatCoin blockchain telemetry:
All training examples use the Llama 3 chat template with system/user/assistant turns. Multilingual coverage: English, Spanish, French, German, Portuguese.
# Download the GGUF
wget https://huggingface.co/ninacatcoin/nina-model/resolve/main/nina-3b-nina-ft-Q4_K_M.gguf
# Place in NinaCatCoin data directory
mv nina-3b-nina-ft-Q4_K_M.gguf ~/.ninacatcoin/nina_model.gguf
# The daemon loads it automatically on startup and validates SHA-256
The NINA Constitution enforces at compile time (via static_assert) that the model:
The LLM Firewall filters all input (blocks prompt injection) and all output (strips addresses, keys, transfer instructions). It is hardcoded — no config, no RPC, no CLI args can disable it.
| Version | Date | Dataset | LoRA | Notes |
|---|---|---|---|---|
| v1.5 | 2026-03-01 | 208 pairs | r64/a128 | Initial release (removed) |
| v2 | 2026-03-02 | 3,074 pairs | r32/a64 | 14.8x more data, optimized LoRA, 34-module integration |
| v3 | 2026-03-11 | 3,980 pairs | r32/a64 | Multilingual (5 langs), 24 JSONL files combined, identity/personality, deep modules, loss 0.54 |