Text Generation
Transformers
Safetensors
HERMES
English
llama
cognitive-control
decode-time-intervention
repetition-suppression
behavioral-control
contrastive-learning
interpretability
activation-engineering
cf-hot
arc
rlhf-analysis
research
conversational
Eval Results (legacy)
text-generation-inference
Run this model with HF Jobs
Run LoganResearch/ARC-Base-8B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/LoganResearch/ARC-Base-8B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LoganResearch/ARC-Base-8B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/LoganResearch/ARC-Base-8B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/LoganResearch/ARC-Base-8B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use LoganResearch/ARC-Base-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LoganResearch/ARC-Base-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LoganResearch/ARC-Base-8B") 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("LoganResearch/ARC-Base-8B") model = AutoModelForCausalLM.from_pretrained("LoganResearch/ARC-Base-8B", 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]:])) - HERMES
How to use LoganResearch/ARC-Base-8B with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LoganResearch/ARC-Base-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LoganResearch/ARC-Base-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LoganResearch/ARC-Base-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LoganResearch/ARC-Base-8B
- SGLang
How to use LoganResearch/ARC-Base-8B 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 "LoganResearch/ARC-Base-8B" \ --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": "LoganResearch/ARC-Base-8B", "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 "LoganResearch/ARC-Base-8B" \ --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": "LoganResearch/ARC-Base-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LoganResearch/ARC-Base-8B with Docker Model Runner:
docker model run hf.co/LoganResearch/ARC-Base-8B
Delete README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180# Lie-Holonomy Transformer (LHT)
A PyTorch implementation of the gauge-theoretic reasoning architecture from "Beyond Holonomy: Lie-Algebraic Symbol Emergence and the Homotopy Type Structure of Neural Reasoning."
## Core Ideas
This architecture treats **reasoning as geometry**:
| Concept | Mathematical Structure | Implementation ||---------|----------------------|----------------|| Propositions | Manifold M | Embedding space || Inference | Parallel transport | Gauge-covariant attention || Consistency | Holonomy = Identity | Holonomy loss || Symbols | Lie algebra generators | Generator network || Proof equivalence | Homotopy | Layer depth |
## Architecture Overview
```Input tokens │ ▼┌─────────────────────────────────────┐│ Token Embedding (Proposition M) ││ + Position Embedding ││ + Fiber Initialization (gauge) │└─────────────────────────────────────┘ │ ▼┌─────────────────────────────────────┐│ LHT Layer (× n_layers) ││ ┌─────────────────────────────┐ ││ │ Connection Network A(x) │ │ ← Learns gauge connection│ │ Parallel Transport Γ_{j→i} │ │ ← Transports fiber elements│ │ Gauge-Covariant Attention │ │ ← Modified self-attention│ │ Lie Algebra Generator │ │ ← Generates inference ops│ │ Generator Application │ │ ← Applies exp(X) to fiber│ └─────────────────────────────┘ │└─────────────────────────────────────┘ │ ▼┌─────────────────────────────────────┐│ Output: logits + geometric losses │└─────────────────────────────────────┘```
## Key Components
### 1. Connection NetworkLearns the gauge connection ω that defines how to parallel transport inferential states:```pythonA_μ(x) ∈ gl(k,ℝ) # Lie algebra valued 1-form```
### 2. Parallel TransportComputes transport operators between positions:```pythonΓ_{j→i} = exp(-A_μ(x_j)(x_i - x_j)^μ)```
### 3. Gauge-Covariant AttentionStandard attention with parallel transport of values:```python# Standard: Attn(Q,K,V)_i = Σ_j α_ij V_j# Gauge: GaugeAttn_i = Σ_j α_ij Γ_{j→i}(V_j)```
### 4. Holonomy LossEnforces reasoning consistency by requiring closed loops to return to identity:```pythonL_hol = E[||Hol_γ - I||²_F]```
### 5. Curvature RegularizationEncourages flat reasoning spaces where order doesn't matter:```pythonL_curv = E[||F(x)||²_F] where F = dω + ω∧ω```
## Installation
```bashpip install torch```
## Usage
### Basic```pythonfrom lht import LieHolonomyTransformer, LHTConfig
# Create modelconfig = LHTConfig( vocab_size=32000, d_model=512, d_fiber=64, n_heads=8, n_layers=6, lie_algebra_rank=8,)model = LieHolonomyTransformer(config)
# Forward passoutput = model( input_ids=tokens, labels=labels, return_geometric_losses=True)
# Get losseslm_loss = output['lm_loss']holonomy_loss = output['holonomy_loss']curvature_loss = output['curvature_loss']total_loss = model.get_total_loss(output)```
### Training with Geometric Loss Annealing```pythonfrom lht import LHTTrainer
trainer = LHTTrainer(model, optimizer, config)
for batch in dataloader: metrics = trainer.train_step(batch) # Early training: high curvature loss → flat representations # Mid training: high holonomy loss → consistency # Late training: high waypoint loss → discrete structure```
### Waypoint Detection```pythonfrom lht import WaypointDetector
detector = WaypointDetector(config, n_waypoints=32)waypoint_ids, stability = detector(representations)```
## Configuration
| Parameter | Description | Default ||-----------|-------------|---------|| `d_model` | Proposition manifold dimension | 512 || `d_fiber` | Fiber (gauge) dimension | 64 || `lie_algebra_rank` | k for GL(k,ℝ) structure group | 8 || `lambda_holonomy` | Weight for holonomy loss | 0.1 || `lambda_curvature` | Weight for curvature loss | 0.01 || `lambda_waypoint` | Weight for waypoint stability | 0.05 |
## Theoretical Predictions
The framework makes testable predictions:
1. **Chain-of-thought benefit correlates with curvature** - High-curvature domains (causal reasoning) benefit more from CoT than low-curvature domains (arithmetic)
2. **Waypoints emerge spontaneously** - Training with holonomy loss should cause discrete symbol-like structures to form at flat loci
3. **Holonomy predicts errors** - Incorrect reasoning paths should have higher holonomy magnitude
4. **Compositional generalization improves** - Holonomy constraints force consistent composition
## File Structure
```lie_holonomy_transformer/├── lht.py # Core implementation├── train.py # Training script ├── README.md # This file└── experiments/ # Benchmark code (TODO)```
## References
- "Beyond Holonomy: Lie-Algebraic Symbol Emergence..." (the paper)- Cohen et al. (2019). Gauge Equivariant Convolutional Networks- Weiler & Cesa (2019). General E(2)-Equivariant Steerable CNNs- The Univalent Foundations Program (2013). Homotopy Type Theory
## License
MITREADME.mdDeleted-180