add multi adapter

This commit is contained in:
csunny 2023-05-19 21:44:54 +08:00
parent 8aad345e87
commit e2f18fc187
2 changed files with 16 additions and 1 deletions

View File

@ -21,7 +21,9 @@ LLM_MODEL_CONFIG = {
"flan-t5-base": os.path.join(MODEL_PATH, "flan-t5-base"),
"vicuna-13b": os.path.join(MODEL_PATH, "vicuna-13b"),
"text2vec": os.path.join(MODEL_PATH, "text2vec-large-chinese"),
"sentence-transforms": os.path.join(MODEL_PATH, "all-MiniLM-L6-v2")
"sentence-transforms": os.path.join(MODEL_PATH, "all-MiniLM-L6-v2"),
"codegen2-7b": os.path.join(MODEL_PATH, ""),
"codet5p-2b": os.path.join(MODEL_PATH, "codet5p-2b"),
}
# Load model config

View File

@ -68,6 +68,19 @@ class ChatGLMAdapater(BaseLLMAdaper):
model_path, trust_remote_code=True, **from_pretrained_kwargs
).half().cuda()
return model, tokenizer
class ZiYaLLaMaAdapter(BaseLLMAdaper):
# TODO
pass
class CodeGenAdapter(BaseLLMAdaper):
pass
class StarCoderAdapter(BaseLLMAdaper):
pass
class T5CodeAdapter(BaseLLMAdaper):
pass
class KoalaLLMAdapter(BaseLLMAdaper):
"""Koala LLM Adapter which Based LLaMA """