Downloads · 30 days
8
31% of all-time downloads
Joshi-Aryan/llama2_test_wikidata
llama2_test_wikidata is a question answering model from Joshi-Aryan. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
8
31% of all-time downloads
All-time downloads
26
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
#Usage
<pre> pip install transformers accelerate from transformers import AutoTokenizer import transformers import torch model = "Joshi-Aryan/llama-2-7b-miniguanaco" prompt = "What is a large language model?" tokenizer = AutoTokenizer.from_pretrained(model) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) sequences = pipeline( f'<s>[INST] {prompt} [/INST]', do_sample=True, top_k=10, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id, max_length=200, ) for seq in sequences: print(f"Result: {seq['generated_text']}") </pre>