mirror of
https://github.com/wassname/alpaca_convert.git
synced 2026-06-27 14:58:51 +08:00
remove the clone method as it's twice the size?
This commit is contained in:
Vendored
+18
-18
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"peacock.color": "#8d5a0f",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#369e23",
|
||||
"activityBar.background": "#369e23",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#2e47d1",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"commandCenter.border": "#e7e7e799",
|
||||
"sash.hoverBorder": "#369e23",
|
||||
"statusBar.background": "#28741a",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#369e23",
|
||||
"statusBarItem.remoteBackground": "#28741a",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||
"titleBar.activeBackground": "#28741a",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#28741a99",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
"activityBar.activeBackground": "#cfc5e4",
|
||||
"activityBar.background": "#cfc5e4",
|
||||
"activityBar.foreground": "#15202b",
|
||||
"activityBar.inactiveForeground": "#15202b99",
|
||||
"activityBarBadge.background": "#b88167",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"commandCenter.border": "#15202b99",
|
||||
"sash.hoverBorder": "#cfc5e4",
|
||||
"statusBar.background": "#b3a2d4",
|
||||
"statusBar.foreground": "#15202b",
|
||||
"statusBarItem.hoverBackground": "#967fc4",
|
||||
"statusBarItem.remoteBackground": "#b3a2d4",
|
||||
"statusBarItem.remoteForeground": "#15202b",
|
||||
"titleBar.activeBackground": "#b3a2d4",
|
||||
"titleBar.activeForeground": "#15202b",
|
||||
"titleBar.inactiveBackground": "#b3a2d499",
|
||||
"titleBar.inactiveForeground": "#15202b99"
|
||||
},
|
||||
"peacock.remoteColor": "#28741a"
|
||||
"peacock.remoteColor": "#b3a2d4"
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
'''
|
||||
clones models from Hugging Face to models/model-name.
|
||||
|
||||
Example:
|
||||
python clone-model.py facebook/opt-1.3b
|
||||
|
||||
this seems nicer than the previous script https://github.com/oobabooga/text-generation-webui/blob/main/download-model.py
|
||||
|
||||
'''
|
||||
|
||||
from git import Repo
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('MODEL', type=str, default=None, help="`tloen/alpaca-lora-7b`")
|
||||
parser.add_argument('-b', '--branch', type=str, default='main', help='Name of the Git branch to download from.')
|
||||
parser.add_argument('-t', '--text_only', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
model = args.MODEL
|
||||
repo = 'https://huggingface.co/' + model
|
||||
name = model.replace('/', '_')
|
||||
output_folder = './data/loras' if 'lora' in name else './data/models'
|
||||
dest = f'{output_folder}/{name}_git'
|
||||
|
||||
if args.text_only:
|
||||
os.environ['GIT_LFS_SKIP_SMUDGE']="1"
|
||||
|
||||
|
||||
result = subprocess.run(['git', 'lfs'], capture_output=True)
|
||||
assert result.returncode==0, 'git lfs should be installed'
|
||||
|
||||
print(f'cloning "{repo}" to "{dest}"')
|
||||
Repo.clone_from(repo, dest, multi_options=['--depth=1', '--branch=main', '--filter=blob:none'])
|
||||
|
||||
# FIXME it clones the git folder that has a huge size, it seems to have the old git lfs objects. so it's double the size. I can't seem to stop that
|
||||
Reference in New Issue
Block a user