mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-06 03:20:41 +00:00
checkout load_model to fastchat
This commit is contained in:
@@ -84,4 +84,5 @@ def get_embeddings(model, tokenizer, prompt):
|
||||
input_embeddings = model.get_input_embeddings()
|
||||
embeddings = input_embeddings(torch.LongTensor([input_ids]))
|
||||
mean = torch.mean(embeddings[0], 0).cpu().detach()
|
||||
return mean
|
||||
return mean
|
||||
|
||||
|
Reference in New Issue
Block a user