Skip to content

Commit a48240f

Browse files
committed
Release
1 parent 47f5e84 commit a48240f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+35751
-138
lines changed

.github/workflows/test.yaml

+31-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
11
name: CI
2-
on: [workflow_dispatch, pull_request, push]
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: [main]
37

48
jobs:
59
test:
6-
runs-on: ubuntu-latest
7-
steps: [uses: fastai/workflows/nbdev-ci@master]
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
os: [ubuntu]
14+
version: ["3.10", "3.11"]
15+
runs-on: ${{ matrix.os }}-latest
16+
steps:
17+
- uses: fastai/workflows/nbdev-ci@master
18+
with:
19+
version: ${{ matrix.version }}
20+
pre: 1
21+
- name: test docs build
22+
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && matrix.version == '3.10' && matrix.os == 'ubuntu' }}
23+
run: |
24+
set -ux
25+
wget -q $(curl https://latest.fast.ai/pre/quarto-dev/quarto-cli/linux-amd64.deb)
26+
sudo dpkg -i quarto*.deb
27+
nbdev_docs
28+
if [ -f "_docs/index.html" ]; then
29+
echo "docs built successfully."
30+
else
31+
echo "index page not found in rendered docs."
32+
ls -la
33+
ls -la _docs
34+
exit 1
35+
fi

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
models/
2+
data/*
3+
!data/eval-dsets
4+
15
_docs/
26
_proc/
37

README.md

+350-11
Large diffs are not rendered by default.

cfgs/deepspeed/hostfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
worker-1 slots=8
2+
worker-2 slots=8
3+
worker-3 slots=8
4+
worker-4 slots=8

cfgs/deepspeed/no-zero.conf

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"zero_optimization": {
3+
"stage": 0
4+
},
5+
"gradient_accumulation_steps": "auto",
6+
"gradient_clipping": "auto",
7+
"steps_per_print": 100,
8+
"train_batch_size": "auto",
9+
"train_micro_batch_size_per_gpu": "auto",
10+
"wall_clock_breakdown": true
11+
}

cfgs/deepspeed/zero-stage1.conf

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"zero_optimization": {
3+
"stage": 1,
4+
"overlap_comm": false,
5+
"allgather_bucket_size": 5e8,
6+
"reduce_bucket_size": 5e8
7+
},
8+
"gradient_accumulation_steps": "auto",
9+
"gradient_clipping": "auto",
10+
"train_batch_size": "auto",
11+
"train_micro_batch_size_per_gpu": "auto",
12+
"steps_per_print": 100,
13+
"wall_clock_breakdown": true
14+
}

cfgs/deepspeed/zero-stage2.conf

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"zero_optimization": {
3+
"stage": 2,
4+
"overlap_comm": false,
5+
"allgather_bucket_size": 5e8,
6+
"reduce_bucket_size": 5e8,
7+
},
8+
"gradient_accumulation_steps": "auto",
9+
"gradient_clipping": "auto",
10+
"train_batch_size": "auto",
11+
"train_micro_batch_size_per_gpu": "auto",
12+
"steps_per_print": 100,
13+
"wall_clock_breakdown": true
14+
}

cfgs/deepspeed/zero-stage3.conf

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"bf16": {
3+
"enabled": "auto"
4+
},
5+
"zero_optimization": {
6+
"stage": 3,
7+
"overlap_comm": false,
8+
"allgather_bucket_size": 5e8,
9+
"reduce_bucket_size": 5e8,
10+
"contiguous_gradients": true,
11+
"sub_group_size": 1e9,
12+
"stage3_prefetch_bucket_size": "auto",
13+
"stage3_param_persistence_threshold": "auto",
14+
"stage3_max_live_parameters": 1e9,
15+
"stage3_max_reuse_distance": 1e9,
16+
"stage3_gather_16bit_weights_on_model_save": true
17+
},
18+
"gradient_accumulation_steps": "auto",
19+
"gradient_clipping": "auto",
20+
"steps_per_print": 100,
21+
"train_batch_size": "auto",
22+
"train_micro_batch_size_per_gpu": "auto",
23+
"wall_clock_breakdown": true
24+
}

dart/__init__.py

-1
This file was deleted.

dart/_modidx.py

-8
This file was deleted.

dart/core.py

-8
This file was deleted.

dart_math/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

dart_math/_modidx.py

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Autogenerated by nbdev
2+
3+
d = { 'settings': { 'branch': 'main',
4+
'doc_baseurl': '/dart-math',
5+
'doc_host': 'https://hkust-nlp.github.io',
6+
'git_url': 'https://github.com/hkust-nlp/dart-math',
7+
'lib_path': 'dart_math'},
8+
'syms': { 'dart_math.data': { 'dart_math.data.QueryDataPoint': ('data.html#querydatapoint', 'dart_math/data.py'),
9+
'dart_math.data.QueryDataPoint.__init__': ('data.html#querydatapoint.__init__', 'dart_math/data.py'),
10+
'dart_math.data.RespSampleBase': ('data.html#respsamplebase', 'dart_math/data.py'),
11+
'dart_math.data.RespSampleBase.__init__': ('data.html#respsamplebase.__init__', 'dart_math/data.py'),
12+
'dart_math.data.RespSampleBase.collect': ('data.html#respsamplebase.collect', 'dart_math/data.py'),
13+
'dart_math.data.RespSampleBase.to_dict': ('data.html#respsamplebase.to_dict', 'dart_math/data.py'),
14+
'dart_math.data.RespSampleVLLM': ('data.html#respsamplevllm', 'dart_math/data.py'),
15+
'dart_math.data.RespSampleVLLM.__init__': ('data.html#respsamplevllm.__init__', 'dart_math/data.py'),
16+
'dart_math.data.RespSampleVLLM.collect': ('data.html#respsamplevllm.collect', 'dart_math/data.py'),
17+
'dart_math.data.extract_ans_from_math_sol': ('data.html#extract_ans_from_math_sol', 'dart_math/data.py'),
18+
'dart_math.data.extract_level_from_math_dp': ('data.html#extract_level_from_math_dp', 'dart_math/data.py'),
19+
'dart_math.data.load_query_dps': ('data.html#load_query_dps', 'dart_math/data.py')},
20+
'dart_math.eval': { 'dart_math.eval.EvaluatorBase': ('eval.html#evaluatorbase', 'dart_math/eval.py'),
21+
'dart_math.eval.EvaluatorBase.__init__': ('eval.html#evaluatorbase.__init__', 'dart_math/eval.py'),
22+
'dart_math.eval.EvaluatorBase.clean': ('eval.html#evaluatorbase.clean', 'dart_math/eval.py'),
23+
'dart_math.eval.EvaluatorBase.clean_preceding': ( 'eval.html#evaluatorbase.clean_preceding',
24+
'dart_math/eval.py'),
25+
'dart_math.eval.EvaluatorBase.clean_trailing': ( 'eval.html#evaluatorbase.clean_trailing',
26+
'dart_math/eval.py'),
27+
'dart_math.eval.EvaluatorBase.eq': ('eval.html#evaluatorbase.eq', 'dart_math/eval.py'),
28+
'dart_math.eval.EvaluatorBase.eval': ('eval.html#evaluatorbase.eval', 'dart_math/eval.py'),
29+
'dart_math.eval.EvaluatorBase.extract_ans': ('eval.html#evaluatorbase.extract_ans', 'dart_math/eval.py'),
30+
'dart_math.eval.EvaluatorBatchBase': ('eval.html#evaluatorbatchbase', 'dart_math/eval.py'),
31+
'dart_math.eval.EvaluatorBatchBase.__init__': ( 'eval.html#evaluatorbatchbase.__init__',
32+
'dart_math/eval.py'),
33+
'dart_math.eval.EvaluatorBatchBase.batch_eval': ( 'eval.html#evaluatorbatchbase.batch_eval',
34+
'dart_math/eval.py'),
35+
'dart_math.eval.EvaluatorMath': ('eval.html#evaluatormath', 'dart_math/eval.py'),
36+
'dart_math.eval.EvaluatorMath.__init__': ('eval.html#evaluatormath.__init__', 'dart_math/eval.py'),
37+
'dart_math.eval.EvaluatorMath.eq': ('eval.html#evaluatormath.eq', 'dart_math/eval.py'),
38+
'dart_math.eval.EvaluatorMath.eval': ('eval.html#evaluatormath.eval', 'dart_math/eval.py'),
39+
'dart_math.eval.EvaluatorMath.extract_ans': ('eval.html#evaluatormath.extract_ans', 'dart_math/eval.py'),
40+
'dart_math.eval.EvaluatorMath.extract_set': ('eval.html#evaluatormath.extract_set', 'dart_math/eval.py'),
41+
'dart_math.eval.EvaluatorMath.index_first_paren_pair': ( 'eval.html#evaluatormath.index_first_paren_pair',
42+
'dart_math/eval.py'),
43+
'dart_math.eval.EvaluatorMath.latex2matrix': ('eval.html#evaluatormath.latex2matrix', 'dart_math/eval.py'),
44+
'dart_math.eval.EvaluatorMath.norm_ans_str': ('eval.html#evaluatormath.norm_ans_str', 'dart_math/eval.py'),
45+
'dart_math.eval.EvaluatorMath.norm_basic_fn': ( 'eval.html#evaluatormath.norm_basic_fn',
46+
'dart_math/eval.py'),
47+
'dart_math.eval.EvaluatorMath.norm_math_str': ( 'eval.html#evaluatormath.norm_math_str',
48+
'dart_math/eval.py'),
49+
'dart_math.eval.EvaluatorMath.norm_pm': ('eval.html#evaluatormath.norm_pm', 'dart_math/eval.py'),
50+
'dart_math.eval.EvaluatorMath.norm_str2date_time': ( 'eval.html#evaluatormath.norm_str2date_time',
51+
'dart_math/eval.py'),
52+
'dart_math.eval.EvaluatorMath.remove_first_paren_pair': ( 'eval.html#evaluatormath.remove_first_paren_pair',
53+
'dart_math/eval.py'),
54+
'dart_math.eval.EvaluatorMath.remove_latex_cmd': ( 'eval.html#evaluatormath.remove_latex_cmd',
55+
'dart_math/eval.py'),
56+
'dart_math.eval.EvaluatorMath.remove_out_paren': ( 'eval.html#evaluatormath.remove_out_paren',
57+
'dart_math/eval.py'),
58+
'dart_math.eval.EvaluatorMath.sym_eq': ('eval.html#evaluatormath.sym_eq', 'dart_math/eval.py'),
59+
'dart_math.eval.EvaluatorMathBatch': ('eval.html#evaluatormathbatch', 'dart_math/eval.py'),
60+
'dart_math.eval.EvaluatorMathBatch.__init__': ( 'eval.html#evaluatormathbatch.__init__',
61+
'dart_math/eval.py'),
62+
'dart_math.eval.extract_boxed': ('eval.html#extract_boxed', 'dart_math/eval.py'),
63+
'dart_math.eval.fix_a_slash_b': ('eval.html#fix_a_slash_b', 'dart_math/eval.py'),
64+
'dart_math.eval.fix_fracs': ('eval.html#fix_fracs', 'dart_math/eval.py'),
65+
'dart_math.eval.fix_sqrt': ('eval.html#fix_sqrt', 'dart_math/eval.py'),
66+
'dart_math.eval.has_non_ascii': ('eval.html#has_non_ascii', 'dart_math/eval.py'),
67+
'dart_math.eval.is_querying4set': ('eval.html#is_querying4set', 'dart_math/eval.py'),
68+
'dart_math.eval.is_set': ('eval.html#is_set', 'dart_math/eval.py'),
69+
'dart_math.eval.latex2sympy_fix': ('eval.html#latex2sympy_fix', 'dart_math/eval.py'),
70+
'dart_math.eval.latex2sympy_interval': ('eval.html#latex2sympy_interval', 'dart_math/eval.py'),
71+
'dart_math.eval.norm_deg': ('eval.html#norm_deg', 'dart_math/eval.py'),
72+
'dart_math.eval.norm_str2bool': ('eval.html#norm_str2bool', 'dart_math/eval.py'),
73+
'dart_math.eval.norm_str2weekday': ('eval.html#norm_str2weekday', 'dart_math/eval.py'),
74+
'dart_math.eval.parse': ('eval.html#parse', 'dart_math/eval.py'),
75+
'dart_math.eval.rm_latex_env': ('eval.html#rm_latex_env', 'dart_math/eval.py')},
76+
'dart_math.gen': { 'dart_math.gen.gen': ('gen.html#gen', 'dart_math/gen.py'),
77+
'dart_math.gen.get_icl_egs': ('gen.html#get_icl_egs', 'dart_math/gen.py'),
78+
'dart_math.gen.get_n_shots': ('gen.html#get_n_shots', 'dart_math/gen.py'),
79+
'dart_math.gen.get_prompt_template4model': ('gen.html#get_prompt_template4model', 'dart_math/gen.py'),
80+
'dart_math.gen.get_res_fname': ('gen.html#get_res_fname', 'dart_math/gen.py'),
81+
'dart_math.gen.is_dp_dars_finished': ('gen.html#is_dp_dars_finished', 'dart_math/gen.py')},
82+
'dart_math.olympiadbench': {},
83+
'dart_math.parallel': { 'dart_math.parallel.async_wrap': ('parallel.html#async_wrap', 'dart_math/parallel.py'),
84+
'dart_math.parallel.seq_consume_preset_queue_w_each_timeout': ( 'parallel.html#seq_consume_preset_queue_w_each_timeout',
85+
'dart_math/parallel.py')},
86+
'dart_math.train': { 'dart_math.train.PackedDataset': ('train.html#packeddataset', 'dart_math/train.py'),
87+
'dart_math.train.PackedDataset.__getitem__': ( 'train.html#packeddataset.__getitem__',
88+
'dart_math/train.py'),
89+
'dart_math.train.PackedDataset.__init__': ('train.html#packeddataset.__init__', 'dart_math/train.py'),
90+
'dart_math.train.PackedDataset.__len__': ('train.html#packeddataset.__len__', 'dart_math/train.py'),
91+
'dart_math.train.PackedDataset.extract_ids': ( 'train.html#packeddataset.extract_ids',
92+
'dart_math/train.py'),
93+
'dart_math.train.PackedDataset.pack_dps_FA': ( 'train.html#packeddataset.pack_dps_fa',
94+
'dart_math/train.py'),
95+
'dart_math.train.PackedDataset.pack_dps_by_len': ( 'train.html#packeddataset.pack_dps_by_len',
96+
'dart_math/train.py'),
97+
'dart_math.train.PackedDataset.stat': ('train.html#packeddataset.stat', 'dart_math/train.py'),
98+
'dart_math.train.TokenizedSupervisedDataset': ( 'train.html#tokenizedsuperviseddataset',
99+
'dart_math/train.py'),
100+
'dart_math.train.TokenizedSupervisedDataset.__getitem__': ( 'train.html#tokenizedsuperviseddataset.__getitem__',
101+
'dart_math/train.py'),
102+
'dart_math.train.TokenizedSupervisedDataset.__init__': ( 'train.html#tokenizedsuperviseddataset.__init__',
103+
'dart_math/train.py'),
104+
'dart_math.train.TokenizedSupervisedDataset.__len__': ( 'train.html#tokenizedsuperviseddataset.__len__',
105+
'dart_math/train.py'),
106+
'dart_math.train.TokenizedSupervisedDataset.concat': ( 'train.html#tokenizedsuperviseddataset.concat',
107+
'dart_math/train.py'),
108+
'dart_math.train.TokenizedSupervisedDataset.load_from_raw_dset': ( 'train.html#tokenizedsuperviseddataset.load_from_raw_dset',
109+
'dart_math/train.py'),
110+
'dart_math.train.TokenizedSupervisedDataset.pad': ( 'train.html#tokenizedsuperviseddataset.pad',
111+
'dart_math/train.py'),
112+
'dart_math.train.TokenizedSupervisedDataset.shuffle': ( 'train.html#tokenizedsuperviseddataset.shuffle',
113+
'dart_math/train.py'),
114+
'dart_math.train.get_tokenized_cache_fname': ( 'train.html#get_tokenized_cache_fname',
115+
'dart_math/train.py'),
116+
'dart_math.train.make_supervised_dset': ('train.html#make_supervised_dset', 'dart_math/train.py'),
117+
'dart_math.train.monkey_patch4pack': ('train.html#monkey_patch4pack', 'dart_math/train.py'),
118+
'dart_math.train.preprocess': ('train.html#preprocess', 'dart_math/train.py'),
119+
'dart_math.train.tokenize_fn': ('train.html#tokenize_fn', 'dart_math/train.py')},
120+
'dart_math.utils': { 'dart_math.utils.PromptTemplate': ('utils.html#prompttemplate', 'dart_math/utils.py'),
121+
'dart_math.utils.PromptTemplate.__init__': ('utils.html#prompttemplate.__init__', 'dart_math/utils.py'),
122+
'dart_math.utils.PromptTemplate.load_from_id_or_path': ( 'utils.html#prompttemplate.load_from_id_or_path',
123+
'dart_math/utils.py'),
124+
'dart_math.utils.PromptTemplate.make_full_prompt': ( 'utils.html#prompttemplate.make_full_prompt',
125+
'dart_math/utils.py'),
126+
'dart_math.utils.PromptTemplate.make_prefix_prompt': ( 'utils.html#prompttemplate.make_prefix_prompt',
127+
'dart_math/utils.py'),
128+
'dart_math.utils.PromptTemplate.make_qa_pair': ( 'utils.html#prompttemplate.make_qa_pair',
129+
'dart_math/utils.py'),
130+
'dart_math.utils.get_pathname_from_name_or_path': ( 'utils.html#get_pathname_from_name_or_path',
131+
'dart_math/utils.py'),
132+
'dart_math.utils.init_logging': ('utils.html#init_logging', 'dart_math/utils.py'),
133+
'dart_math.utils.load_json': ('utils.html#load_json', 'dart_math/utils.py'),
134+
'dart_math.utils.load_jsonl': ('utils.html#load_jsonl', 'dart_math/utils.py'),
135+
'dart_math.utils.save_json': ('utils.html#save_json', 'dart_math/utils.py'),
136+
'dart_math.utils.save_jsonl': ('utils.html#save_jsonl', 'dart_math/utils.py')}}}

0 commit comments

Comments
 (0)