Views
No views yet
pip install pyllamacpp1from huggingface_hub import hf_hub_download
2from pyllamacpp.model import Model
3
4#Download the model
5hf_hub_download(repo_id="LLukas22/alpaca-native-7B-4bit-ggjt", filename="ggjt-model.bin", local_dir=".")
6
7#Load the model
8model = Model(ggml_model="ggjt-model.bin", n_ctx=2000)
9
10#Generate
11prompt="The meaning of life is"
12
13result=model.generate(prompt,n_predict=50)