Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyx361 committed Jun 11, 2024
1 parent 47f5e84 commit 676c6c2
Show file tree
Hide file tree
Showing 45 changed files with 35,751 additions and 138 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
name: CI
on: [workflow_dispatch, pull_request, push]
on:
workflow_dispatch:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps: [uses: fastai/workflows/nbdev-ci@master]
strategy:
fail-fast: true
matrix:
os: [ubuntu]
version: ["3.10", "3.11"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: fastai/workflows/nbdev-ci@master
with:
version: ${{ matrix.version }}
pre: 1
- name: test docs build
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && matrix.version == '3.10' && matrix.os == 'ubuntu' }}
run: |
set -ux
wget -q $(curl https://latest.fast.ai/pre/quarto-dev/quarto-cli/linux-amd64.deb)
sudo dpkg -i quarto*.deb
nbdev_docs
if [ -f "_docs/index.html" ]; then
echo "docs built successfully."
else
echo "index page not found in rendered docs."
ls -la
ls -la _docs
exit 1
fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
models/
data/*
!data/eval-dsets

_docs/
_proc/

Expand Down
361 changes: 350 additions & 11 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions cfgs/deepspeed/hostfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
worker-1 slots=8
worker-2 slots=8
worker-3 slots=8
worker-4 slots=8
11 changes: 11 additions & 0 deletions cfgs/deepspeed/no-zero.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"zero_optimization": {
"stage": 0
},
"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"steps_per_print": 100,
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto",
"wall_clock_breakdown": true
}
14 changes: 14 additions & 0 deletions cfgs/deepspeed/zero-stage1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"zero_optimization": {
"stage": 1,
"overlap_comm": false,
"allgather_bucket_size": 5e8,
"reduce_bucket_size": 5e8
},
"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto",
"steps_per_print": 100,
"wall_clock_breakdown": true
}
14 changes: 14 additions & 0 deletions cfgs/deepspeed/zero-stage2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"zero_optimization": {
"stage": 2,
"overlap_comm": false,
"allgather_bucket_size": 5e8,
"reduce_bucket_size": 5e8,
},
"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto",
"steps_per_print": 100,
"wall_clock_breakdown": true
}
24 changes: 24 additions & 0 deletions cfgs/deepspeed/zero-stage3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"bf16": {
"enabled": "auto"
},
"zero_optimization": {
"stage": 3,
"overlap_comm": false,
"allgather_bucket_size": 5e8,
"reduce_bucket_size": 5e8,
"contiguous_gradients": true,
"sub_group_size": 1e9,
"stage3_prefetch_bucket_size": "auto",
"stage3_param_persistence_threshold": "auto",
"stage3_max_live_parameters": 1e9,
"stage3_max_reuse_distance": 1e9,
"stage3_gather_16bit_weights_on_model_save": true
},
"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"steps_per_print": 100,
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto",
"wall_clock_breakdown": true
}
1 change: 0 additions & 1 deletion dart/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions dart/_modidx.py

This file was deleted.

8 changes: 0 additions & 8 deletions dart/core.py

This file was deleted.

1 change: 1 addition & 0 deletions dart_math/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.0"
136 changes: 136 additions & 0 deletions dart_math/_modidx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Autogenerated by nbdev

d = { 'settings': { 'branch': 'main',
'doc_baseurl': '/dart-math',
'doc_host': 'https://hkust-nlp.github.io',
'git_url': 'https://github.com/hkust-nlp/dart-math',
'lib_path': 'dart_math'},
'syms': { 'dart_math.data': { 'dart_math.data.QueryDataPoint': ('data.html#querydatapoint', 'dart_math/data.py'),
'dart_math.data.QueryDataPoint.__init__': ('data.html#querydatapoint.__init__', 'dart_math/data.py'),
'dart_math.data.RespSampleBase': ('data.html#respsamplebase', 'dart_math/data.py'),
'dart_math.data.RespSampleBase.__init__': ('data.html#respsamplebase.__init__', 'dart_math/data.py'),
'dart_math.data.RespSampleBase.collect': ('data.html#respsamplebase.collect', 'dart_math/data.py'),
'dart_math.data.RespSampleBase.to_dict': ('data.html#respsamplebase.to_dict', 'dart_math/data.py'),
'dart_math.data.RespSampleVLLM': ('data.html#respsamplevllm', 'dart_math/data.py'),
'dart_math.data.RespSampleVLLM.__init__': ('data.html#respsamplevllm.__init__', 'dart_math/data.py'),
'dart_math.data.RespSampleVLLM.collect': ('data.html#respsamplevllm.collect', 'dart_math/data.py'),
'dart_math.data.extract_ans_from_math_sol': ('data.html#extract_ans_from_math_sol', 'dart_math/data.py'),
'dart_math.data.extract_level_from_math_dp': ('data.html#extract_level_from_math_dp', 'dart_math/data.py'),
'dart_math.data.load_query_dps': ('data.html#load_query_dps', 'dart_math/data.py')},
'dart_math.eval': { 'dart_math.eval.EvaluatorBase': ('eval.html#evaluatorbase', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.__init__': ('eval.html#evaluatorbase.__init__', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.clean': ('eval.html#evaluatorbase.clean', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.clean_preceding': ( 'eval.html#evaluatorbase.clean_preceding',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.clean_trailing': ( 'eval.html#evaluatorbase.clean_trailing',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.eq': ('eval.html#evaluatorbase.eq', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.eval': ('eval.html#evaluatorbase.eval', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBase.extract_ans': ('eval.html#evaluatorbase.extract_ans', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBatchBase': ('eval.html#evaluatorbatchbase', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorBatchBase.__init__': ( 'eval.html#evaluatorbatchbase.__init__',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorBatchBase.batch_eval': ( 'eval.html#evaluatorbatchbase.batch_eval',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath': ('eval.html#evaluatormath', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.__init__': ('eval.html#evaluatormath.__init__', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.eq': ('eval.html#evaluatormath.eq', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.eval': ('eval.html#evaluatormath.eval', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.extract_ans': ('eval.html#evaluatormath.extract_ans', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.extract_set': ('eval.html#evaluatormath.extract_set', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.index_first_paren_pair': ( 'eval.html#evaluatormath.index_first_paren_pair',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.latex2matrix': ('eval.html#evaluatormath.latex2matrix', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.norm_ans_str': ('eval.html#evaluatormath.norm_ans_str', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.norm_basic_fn': ( 'eval.html#evaluatormath.norm_basic_fn',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.norm_math_str': ( 'eval.html#evaluatormath.norm_math_str',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.norm_pm': ('eval.html#evaluatormath.norm_pm', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.norm_str2date_time': ( 'eval.html#evaluatormath.norm_str2date_time',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.remove_first_paren_pair': ( 'eval.html#evaluatormath.remove_first_paren_pair',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.remove_latex_cmd': ( 'eval.html#evaluatormath.remove_latex_cmd',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.remove_out_paren': ( 'eval.html#evaluatormath.remove_out_paren',
'dart_math/eval.py'),
'dart_math.eval.EvaluatorMath.sym_eq': ('eval.html#evaluatormath.sym_eq', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMathBatch': ('eval.html#evaluatormathbatch', 'dart_math/eval.py'),
'dart_math.eval.EvaluatorMathBatch.__init__': ( 'eval.html#evaluatormathbatch.__init__',
'dart_math/eval.py'),
'dart_math.eval.extract_boxed': ('eval.html#extract_boxed', 'dart_math/eval.py'),
'dart_math.eval.fix_a_slash_b': ('eval.html#fix_a_slash_b', 'dart_math/eval.py'),
'dart_math.eval.fix_fracs': ('eval.html#fix_fracs', 'dart_math/eval.py'),
'dart_math.eval.fix_sqrt': ('eval.html#fix_sqrt', 'dart_math/eval.py'),
'dart_math.eval.has_non_ascii': ('eval.html#has_non_ascii', 'dart_math/eval.py'),
'dart_math.eval.is_querying4set': ('eval.html#is_querying4set', 'dart_math/eval.py'),
'dart_math.eval.is_set': ('eval.html#is_set', 'dart_math/eval.py'),
'dart_math.eval.latex2sympy_fix': ('eval.html#latex2sympy_fix', 'dart_math/eval.py'),
'dart_math.eval.latex2sympy_interval': ('eval.html#latex2sympy_interval', 'dart_math/eval.py'),
'dart_math.eval.norm_deg': ('eval.html#norm_deg', 'dart_math/eval.py'),
'dart_math.eval.norm_str2bool': ('eval.html#norm_str2bool', 'dart_math/eval.py'),
'dart_math.eval.norm_str2weekday': ('eval.html#norm_str2weekday', 'dart_math/eval.py'),
'dart_math.eval.parse': ('eval.html#parse', 'dart_math/eval.py'),
'dart_math.eval.rm_latex_env': ('eval.html#rm_latex_env', 'dart_math/eval.py')},
'dart_math.gen': { 'dart_math.gen.gen': ('gen.html#gen', 'dart_math/gen.py'),
'dart_math.gen.get_icl_egs': ('gen.html#get_icl_egs', 'dart_math/gen.py'),
'dart_math.gen.get_n_shots': ('gen.html#get_n_shots', 'dart_math/gen.py'),
'dart_math.gen.get_prompt_template4model': ('gen.html#get_prompt_template4model', 'dart_math/gen.py'),
'dart_math.gen.get_res_fname': ('gen.html#get_res_fname', 'dart_math/gen.py'),
'dart_math.gen.is_dp_dars_finished': ('gen.html#is_dp_dars_finished', 'dart_math/gen.py')},
'dart_math.olympiadbench': {},
'dart_math.parallel': { 'dart_math.parallel.async_wrap': ('parallel.html#async_wrap', 'dart_math/parallel.py'),
'dart_math.parallel.seq_consume_preset_queue_w_each_timeout': ( 'parallel.html#seq_consume_preset_queue_w_each_timeout',
'dart_math/parallel.py')},
'dart_math.train': { 'dart_math.train.PackedDataset': ('train.html#packeddataset', 'dart_math/train.py'),
'dart_math.train.PackedDataset.__getitem__': ( 'train.html#packeddataset.__getitem__',
'dart_math/train.py'),
'dart_math.train.PackedDataset.__init__': ('train.html#packeddataset.__init__', 'dart_math/train.py'),
'dart_math.train.PackedDataset.__len__': ('train.html#packeddataset.__len__', 'dart_math/train.py'),
'dart_math.train.PackedDataset.extract_ids': ( 'train.html#packeddataset.extract_ids',
'dart_math/train.py'),
'dart_math.train.PackedDataset.pack_dps_FA': ( 'train.html#packeddataset.pack_dps_fa',
'dart_math/train.py'),
'dart_math.train.PackedDataset.pack_dps_by_len': ( 'train.html#packeddataset.pack_dps_by_len',
'dart_math/train.py'),
'dart_math.train.PackedDataset.stat': ('train.html#packeddataset.stat', 'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset': ( 'train.html#tokenizedsuperviseddataset',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.__getitem__': ( 'train.html#tokenizedsuperviseddataset.__getitem__',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.__init__': ( 'train.html#tokenizedsuperviseddataset.__init__',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.__len__': ( 'train.html#tokenizedsuperviseddataset.__len__',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.concat': ( 'train.html#tokenizedsuperviseddataset.concat',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.load_from_raw_dset': ( 'train.html#tokenizedsuperviseddataset.load_from_raw_dset',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.pad': ( 'train.html#tokenizedsuperviseddataset.pad',
'dart_math/train.py'),
'dart_math.train.TokenizedSupervisedDataset.shuffle': ( 'train.html#tokenizedsuperviseddataset.shuffle',
'dart_math/train.py'),
'dart_math.train.get_tokenized_cache_fname': ( 'train.html#get_tokenized_cache_fname',
'dart_math/train.py'),
'dart_math.train.make_supervised_dset': ('train.html#make_supervised_dset', 'dart_math/train.py'),
'dart_math.train.monkey_patch4pack': ('train.html#monkey_patch4pack', 'dart_math/train.py'),
'dart_math.train.preprocess': ('train.html#preprocess', 'dart_math/train.py'),
'dart_math.train.tokenize_fn': ('train.html#tokenize_fn', 'dart_math/train.py')},
'dart_math.utils': { 'dart_math.utils.PromptTemplate': ('utils.html#prompttemplate', 'dart_math/utils.py'),
'dart_math.utils.PromptTemplate.__init__': ('utils.html#prompttemplate.__init__', 'dart_math/utils.py'),
'dart_math.utils.PromptTemplate.load_from_id_or_path': ( 'utils.html#prompttemplate.load_from_id_or_path',
'dart_math/utils.py'),
'dart_math.utils.PromptTemplate.make_full_prompt': ( 'utils.html#prompttemplate.make_full_prompt',
'dart_math/utils.py'),
'dart_math.utils.PromptTemplate.make_prefix_prompt': ( 'utils.html#prompttemplate.make_prefix_prompt',
'dart_math/utils.py'),
'dart_math.utils.PromptTemplate.make_qa_pair': ( 'utils.html#prompttemplate.make_qa_pair',
'dart_math/utils.py'),
'dart_math.utils.get_pathname_from_name_or_path': ( 'utils.html#get_pathname_from_name_or_path',
'dart_math/utils.py'),
'dart_math.utils.init_logging': ('utils.html#init_logging', 'dart_math/utils.py'),
'dart_math.utils.load_json': ('utils.html#load_json', 'dart_math/utils.py'),
'dart_math.utils.load_jsonl': ('utils.html#load_jsonl', 'dart_math/utils.py'),
'dart_math.utils.save_json': ('utils.html#save_json', 'dart_math/utils.py'),
'dart_math.utils.save_jsonl': ('utils.html#save_jsonl', 'dart_math/utils.py')}}}
Loading

0 comments on commit 676c6c2

Please sign in to comment.