still not working

This commit is contained in:
wassname
2023-06-10 14:59:57 +08:00
parent 52c5395fb9
commit 38a5e8a15a
3 changed files with 502 additions and 288 deletions
+4
View File
@@ -179,3 +179,7 @@ stylaised knowledge:
How to get the prompt? more direct. Just a lying one. Just a true one.
Maybe just try:
"The following movie review expresses what sentiment?" just like in ELK and lillian wangs...
File diff suppressed because it is too large Load Diff
+9
View File
@@ -4,6 +4,8 @@ os.environ['CUDA_VISIBLE_DEVICES']="-1"
import torch
import argparse
from transformers import AutoTokenizer, AutoModelForCausalLM
from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE
from pathlib import Path
model_options = dict(
device_map="auto",
@@ -31,6 +33,13 @@ def main(model_repo, lora_repo = None, **download_options):
if __name__=="__main__":
files = [f.relative_to(HUGGINGFACE_HUB_CACHE) for f in Path(HUGGINGFACE_HUB_CACHE).glob('models--*')]
files = "\n".join(sorted([str(f).replace('--', '/') for f in files]))
print(HUGGINGFACE_HUB_CACHE)
print("Downloaded models:\n", files)
1/0
parser = argparse.ArgumentParser()
parser.add_argument('model_repo', type=str)
parser.add_argument('-l', '--lora_repo', type=str, default=None, help='Name of the lora repo')