File size: 4,042 Bytes
78c189b 2d8a5e2 78c189b | 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | ---
tags:
- ml-intern
---
# Oracle-Credit-Compute (OCC) Stack
A minimal, open-source research prototype for **agentic compute allocation** where agents earn and spend non-transferable, decaying credits based on verified marginal impact.
## Quickstart
```bash
git clone https://huggingface.co/narcolepticchicken/occ-stack
cd occ-stack
pip install -r requirements.txt
# Simulated benchmarks (CPU)
python benchmarks/benchmark_code.py # Code compute allocation
python benchmarks/benchmark_retrieval_qa.py # Retrieval QA
python benchmarks/benchmark_debate_v2.py # Multi-agent debate
# Ablations + anti-gaming (CPU, ~5 min)
python eval_runner.py
# Real LLM benchmark (GPU, requires T4+)
python jobs/run_real_llm_standalone_v7.py
# Unit tests
python tests/test_oracle.py
python tests/test_ledger.py
```
## Architecture
```
βββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Agent βββββΆβ ResourceBroker βββββΆβ Compute β
β (requests β β (allow/deny/ β β (model call,β
β resource) ββββββ downgrade) ββββββ retrieval) β
βββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββ βββββββββββββββββββ
β CreditLedgerββββββ ImpactOracle β
β (earn/spend/β β (score action β
β decay) β β on verified β
βββββββββββββββ β impact) β
βββββββββββββββββββ
```
## Key Results (Simulated)
- **52.3% compute reduction at iso-accuracy** on code benchmark (OCC tiered escalation vs fixed budget)
- **76% accuracy with 40% adversarial agents** in debate (OCC credit-filtering vs 56% naive confidence voting)
- **All anti-gaming attacks contained:** hidden-test gaming, collusion, over-abstention, spam
## Status
| Component | Status |
|-----------|--------|
| Impact Oracle | β
Working |
| Credit Ledger | β
Working |
| Resource Broker | β
Working |
| GRPO/RL Hook | β
Factory ready |
| Simulated benchmarks | β
Complete |
| Ablations (10 conditions) | β
Complete |
| Anti-gaming tests | β
Complete |
| Real LLM benchmark | π V7 in progress |
| GRPO training | π Not yet run |
## Repo Structure
```
occ/
oracle/ # ImpactOracle β rule-based scoring
ledger/ # CreditLedger β non-transferable, decaying credits
broker/ # ResourceBroker β capability-based access control
rl/ # RewardHook, OfflineComparator β TRL GRPO integration
benchmarks/ # 3 benchmark scripts + real LLM variants
tests/ # Unit tests
reports/ # Reports, results, blog post
jobs/ # Self-contained GPU job scripts
```
## Citation
```bibtex
@misc{occ2026,
title={Oracle-Credit-Compute: A Minimal Stack for Agentic Compute Allocation},
author={narcolepticchicken},
year={2026},
url={https://huggingface.co/narcolepticchicken/occ-stack}
}
```
<!-- ml-intern-provenance -->
## Generated by ML Intern
This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
- Try ML Intern: https://smolagents-ml-intern.hf.space
- Source code: https://github.com/huggingface/ml-intern
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = 'narcolepticchicken/occ-stack'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
```
For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
|