Spaces:
Sleeping
Sleeping
Update app.py
Browse files46 unmodified lines474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012146 unmodified lines3. 📈 Flexible scalability: Robust performance across diverse inference budgets on reasoning benchmarks like AIME and LiveCodeBench.4. ⚙️ Better performance with fewer tokens: Our trained model generates outputs that are 30% shorter while maintaining (or even improving) accuracy.<p align="center"><img src="figs/aime.png" width="46%" /><img src="figs/livecode.png" width="48%" /></p><p align="center"><img src="figs/codetable.png" width="90%" /></p>## Environment Setup### Installation```bash# Installing Python 3.10 Environment.conda create -n e1 python=3.10 -yconda activate e1# Installing dependencies.cd Elastic-Reasoningpip install -e ./verlpip install -e .```### DataOur raw training data is in `rllm/data/[train|test]/[code|math]/`, along with preprocessing scripts in `rllm/data/preprocess`. To convert the raw data into Parquet files for training, run:```bash# Download datasets from GDrive, populates rllm/data/[train|test]/[math|code]/*.jsonpython scripts/data/download_datasets.py# Generate parquet files for Deepcoder/DeepscaleR in data/*.parquetpython scripts/data/[deepcoder|deepscaler]_dataset.py```## Training```bashexport MODEL_PATH="agentica-org/DeepScaleR-1.5B-Preview"./scripts/e1-math/e1_math_1.5b_1k_1k.sh --model $MODEL_PATH```## EvaluationTo run our evaluation scripts, run:```bash./scripts/eval/eval_model.sh --model [CHECKPOINT_PATH] --datasets [DATASET1] [DATASET2] --output-dir [OUTPUT_DIR] --n [N_PASSES] --tp [TENSOR_PARALLEL_SIZE] --e1-mode [SEPARATE_BUDGETING] --e1-thinking-length [THINKING_LENGTH] --e1-solution-length [SOLUTION_LENGTH]```### Example on MATH```bash./scripts/eval/eval_model.sh --model Salesforce/E1-Math-1.5B --datasets aime math amc minerva olympiad_bench --output-dir $HOME/E1-Math-1.5B --tp 1 --n 16 --e1-mode True --e1-thinking-length 1024 --e1-solution-length 1024```### Example on LiveCodeBench```bash./scripts/eval/eval_model.sh --model Salesforce/E1-Code-14B --datasets test_livecodebench --output-dir $HOME/E1-Code-14B --tp 4 --e1-mode True --e1-thinking-length 1024 --e1-solution-length 1024```### Example on Codeforces```bash./scripts/eval/eval_model.sh --model Salesforce/E1-Code-14B --datasets test_codeforces --output-dir $HOME/DeepCoder-14B-Preview --tp 4 --n 8 --e1-mode True --e1-thinking-length 1024 --e1-solution-length 1024``````bashpython scripts/deepcoder/benchmark/cf_elo_calc.py --results_path [RESULTS_JSON_PATH] --pass_n 8```### Unconstrained evaluationset `--e1-mode False` and `--max-length [Maxmum token length, e.g. 32768]`## AcknowledgementWe greatly thanks [rllm](https://github.com/agentica-project/rllm) and [verl](https://github.com/volcengine/verl) for providing the awesome codebase!## Citation46 unmodified lines47484950515246 unmodified lines3. 📈 Flexible scalability: Robust performance across diverse inference budgets on reasoning benchmarks like AIME and LiveCodeBench.4. ⚙️ Better performance with fewer tokens: Our trained model generates outputs that are 30% shorter while maintaining (or even improving) accuracy.## Citation
app.py-69