2023-03-28 08:59:54 +00:00
|
|
|
import argparse
|
|
|
|
|
|
|
|
from llama_cpp import Llama
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument("-m", "--model", type=str, default=".//models/...")
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
llm = Llama(model_path=args.model, embedding=True)
|
|
|
|
|
2023-04-01 17:02:51 +00:00
|
|
|
print(llm.create_embedding("Hello world!"))
|