update scripts

Former-commit-id: dabf5a1dc661a6581474c6a5ec115322d168ed5f
This commit is contained in:
hiyouga
2024-08-09 19:16:23 +08:00
parent 5af32ce705
commit 9d1e2c3c1f
8 changed files with 29 additions and 16 deletions

View File

@@ -16,7 +16,7 @@
import json
import os
from collections import OrderedDict
from typing import Any, Dict, Optional
from typing import Any, Dict
import fire
import torch
@@ -139,7 +139,10 @@ def save_config(input_dir: str, output_dir: str, torch_dtype: str):
def llamafy_qwen(
input_dir: str, output_dir: str, shard_size: Optional[str] = "2GB", save_safetensors: Optional[bool] = False
input_dir: str,
output_dir: str,
shard_size: str = "2GB",
save_safetensors: bool = False,
):
r"""
Converts the Qwen models in the same format as LLaMA2.