2023-03-28 08:59:54 +00:00
|
|
|
import argparse
|
|
|
|
|
|
|
|
from llama_cpp import Llama
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
2023-04-10 02:45:55 +00:00
|
|
|
parser.add_argument("-m", "--model", type=str, default="../models/7B/ggml-model.bin")
|
2023-03-28 08:59:54 +00:00
|
|
|
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!"))
|