init model and tokenizer

This commit is contained in:
csunny
2023-04-28 22:18:08 +08:00
parent c72ae1a87f
commit 0861a09a00
6 changed files with 15 additions and 4 deletions

0
pilot/server/__init__.py Normal file
View File

View File

@@ -1,9 +1,15 @@
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
from model.loader import ModerLoader
from pilot.model.loader import ModerLoader
from fastchat.serve.inference import generate_stream
from configs.model_config import *
from pilot.configs.model_config import *
if __name__ == "__main__":
pass
model_path = llm_model_config[LLM_MODEL]
ml = ModerLoader(model_path)
model, tokenizer = ml.loader(load_8bit=True)
print(model)
print(tokenizer)