update readme, add starcoder2, cosmopedia

Former-commit-id: 1ae7c183640146bb9b06c98942985a1721d2b9c9
This commit is contained in:
hiyouga
2024-03-03 01:01:46 +08:00
parent 790b73586b
commit 4fa53b6282
5 changed files with 68 additions and 30 deletions

View File

@@ -743,6 +743,21 @@ register_model_group(
)
register_model_group(
models={
"StarCoder2-3B": {
DownloadSource.DEFAULT: "bigcode/starcoder2-3b",
},
"StarCoder2-7B": {
DownloadSource.DEFAULT: "bigcode/starcoder2-7b",
},
"StarCoder2-15B": {
DownloadSource.DEFAULT: "bigcode/starcoder2-15b",
},
}
)
register_model_group(
models={
"Vicuna1.5-7B-Chat": {

View File

@@ -28,6 +28,7 @@ def save_model(
export_quantization_dataset: str,
export_legacy_format: bool,
export_dir: str,
export_hub_model_id: str,
) -> Generator[str, None, None]:
error = ""
if not model_name:
@@ -59,6 +60,7 @@ def save_model(
finetuning_type=finetuning_type,
template=template,
export_dir=export_dir,
export_hub_model_id=export_hub_model_id or None,
export_size=max_shard_size,
export_quantization_bit=int(export_quantization_bit) if export_quantization_bit in GPTQ_BITS else None,
export_quantization_dataset=export_quantization_dataset,
@@ -77,7 +79,10 @@ def create_export_tab(engine: "Engine") -> Dict[str, "Component"]:
export_quantization_dataset = gr.Textbox(value="data/c4_demo.json")
export_legacy_format = gr.Checkbox()
export_dir = gr.Textbox()
with gr.Row():
export_dir = gr.Textbox()
export_hub_model_id = gr.Textbox()
export_btn = gr.Button()
info_box = gr.Textbox(show_label=False, interactive=False)
@@ -95,6 +100,7 @@ def create_export_tab(engine: "Engine") -> Dict[str, "Component"]:
export_quantization_dataset,
export_legacy_format,
export_dir,
export_hub_model_id,
],
[info_box],
)
@@ -105,6 +111,7 @@ def create_export_tab(engine: "Engine") -> Dict[str, "Component"]:
export_quantization_dataset=export_quantization_dataset,
export_legacy_format=export_legacy_format,
export_dir=export_dir,
export_hub_model_id=export_hub_model_id,
export_btn=export_btn,
info_box=info_box,
)

View File

@@ -1019,6 +1019,20 @@ LOCALES = {
"info": "保存导出模型的文件夹路径。",
},
},
"export_hub_model_id": {
"en": {
"label": "HF Hub ID (optional)",
"info": "Repo ID for uploading model to Hugging Face hub.",
},
"ru": {
"label": "HF Hub ID (опционально)",
"info": "Идентификатор репозитория для загрузки модели на Hugging Face hub.",
},
"zh": {
"label": "HF Hub ID非必填",
"info": "用于将模型上传至 Hugging Face Hub 的仓库 ID。",
},
},
"export_btn": {
"en": {
"value": "Export",