mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-07-13 07:04:45 +00:00
Merge 6f61be451f
into 46ed5d856b
This commit is contained in:
commit
fdfc28e21a
@ -8,21 +8,21 @@ repos:
|
|||||||
args: ['--in-place', '--remove-unused-variables', '--remove-all-unused-imports', '--ignore-init-module-imports']
|
args: ['--in-place', '--remove-unused-variables', '--remove-all-unused-imports', '--ignore-init-module-imports']
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 5.13.2
|
rev: 6.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
name: sort all imports (python)
|
name: sort all imports (python)
|
||||||
args: ["--profile", "black"] # avoid conflict with black
|
args: ["--profile", "black"] # avoid conflict with black
|
||||||
|
|
||||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
rev: 24.10.0
|
rev: 25.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
name: black formatter
|
name: black formatter
|
||||||
args: ['--line-length=120', '--target-version=py37', '--target-version=py38', '--target-version=py39','--target-version=py310']
|
args: ['--line-length=120', '--target-version=py37', '--target-version=py38', '--target-version=py39','--target-version=py310']
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v19.1.5
|
rev: v20.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
name: clang formatter
|
name: clang formatter
|
||||||
|
@ -81,11 +81,11 @@ with gr.Blocks(css=CSS) as demo:
|
|||||||
)
|
)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
btn = gr.UploadButton("📁", file_types=["file"], file_count="multiple", size="sm")
|
btn = gr.UploadButton("📁", file_types=["file"], file_count="multiple", size="sm")
|
||||||
restart_btn = gr.Button(str("\u21BB"), elem_id="restart-btn", scale=1)
|
restart_btn = gr.Button(str("\u21bb"), elem_id="restart-btn", scale=1)
|
||||||
txt = gr.Textbox(
|
txt = gr.Textbox(
|
||||||
scale=8,
|
scale=8,
|
||||||
show_label=False,
|
show_label=False,
|
||||||
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21BB to clear loaded files and restart chat",
|
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21bb to clear loaded files and restart chat",
|
||||||
container=True,
|
container=True,
|
||||||
autofocus=True,
|
autofocus=True,
|
||||||
)
|
)
|
||||||
|
@ -34,8 +34,8 @@ class PreTrainingDataset:
|
|||||||
self.do_whole_word_mask = do_whole_word_mask
|
self.do_whole_word_mask = do_whole_word_mask
|
||||||
self.max_predictions_per_seq = max_predictions_per_seq
|
self.max_predictions_per_seq = max_predictions_per_seq
|
||||||
self.vocab_words = list(tokenizer.vocab.keys())
|
self.vocab_words = list(tokenizer.vocab.keys())
|
||||||
self.rec = re.compile("[\u4E00-\u9FA5]")
|
self.rec = re.compile("[\u4e00-\u9fa5]")
|
||||||
self.whole_rec = re.compile("##[\u4E00-\u9FA5]")
|
self.whole_rec = re.compile("##[\u4e00-\u9fa5]")
|
||||||
|
|
||||||
self.mlm_p = 0.15
|
self.mlm_p = 0.15
|
||||||
self.mlm_mask_p = 0.8
|
self.mlm_mask_p = 0.8
|
||||||
|
Loading…
Reference in New Issue
Block a user