The following documentation is mostly Claudeslop. Read at your own risk.
A benchmark and framework for evaluating and training models on OEIS (Online Encyclopedia of Integer Sequences) next-term prediction tasks.
Current model performance on the OEIS next-term prediction benchmark:
This project evaluates the ability of language models to predict the next term in integer sequences from the Online Encyclopedia of Integer Sequences (OEIS). It includes:
- Data processing tools for OEIS sequences
- Training framework for small models using MLX
- Benchmark tools for evaluating commercial and open-source models
- Visualization utilities for results analysis
- Training Framework: Train small neural language models on OEIS sequences using MLX
- Benchmark System: Test various models and compare performance
- Arithmetic Testing: Specialized testing for arithmetic sequence completion
- Leaderboard: Track and visualize performance across different models
data_processing/: Tools for loading, preprocessing, and preparing OEIS dataprocess_data.py: Formats OEIS sequences for model consumption
train.py: Core training functionality with configuration-based setupsample.yaml: Example configuration for model trainingruns/: Directory containing training runs, checkpoints, and logs
generate.py: Generation utility for trained modelsgenerate_lite.py: Lightweight generation tools with beam search supporttest_arithmetic.py: Test models on arithmetic sequence predictionrun_arithmetic_tests.py: Run test suites and plot resultstest_model.js: JavaScript-based testing for external API models
plot-leaderboard.py: Generate performance comparison chartsplot-logs.py: Visualize training metricsgraphs/: Output directory for generated visualizations
Comparison of beam search versus greedy decoding performance on arithmetic sequence prediction tasks:
The graph demonstrates how beam search consistently outperforms greedy decoding as the number of terms increases, providing more accurate predictions for complex sequences.
- Python 3.8+
- MLX (Apple Silicon optimized)
- Node.js (for API testing)
- Clone the repository
- Install Python dependencies (using
pip install -r requirements.txt) - Install Node.js dependencies with
npm install
python train.py --config sample.yaml# Test a custom model
python test_arithmetic.py --run OEIS-4M
# Generate sequences
python generate.py --run OEIS-4M --prompt "1,2,3,4,5,"
# Run arithmetic test suite
python run_arithmetic_tests.pyCheckpoints of the OEIS-4M and OEIS-19M are included, along with their respective training logs. You can find them in the runs/ directory.
Modify index.js with your API key and run:
npm run start
