Downloads · 30 days
6
2% of all-time downloads
monuminu/llama-2-7b-miniguanaco
llama-2-7b-miniguanaco is a text generation model from monuminu. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
6
2% of all-time downloads
All-time downloads
286
Public
Repo size
27 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
model = AutoModelForCausalLM.from_pretrained(
model_name,
low_cpu_mem_usage=True,
return_dict=True,
torch_dtype=torch.float16,
device_map=device_map,
)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
prompt = "menulis esai tentang perekonomian indonesia"
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=1028, )
result = pipe(f"<s>[INST] {prompt} [/INST]")
print(result[0]['generated_text'])