Dawoodthouseef
commited on
Commit
•
d49d052
1
Parent(s):
581667d
Update README.md
Browse files
README.md
CHANGED
@@ -54,7 +54,36 @@ Meta developed and publicly released the Llama 2 family of large language models
|
|
54 |
**License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
|
55 |
|
56 |
**Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
## Intended Use
|
59 |
**Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
|
60 |
|
|
|
54 |
**License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
|
55 |
|
56 |
**Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
|
57 |
+
'''
|
58 |
+
pip install llama-cpp-python==0.2.6
|
59 |
+
'''
|
60 |
+
|
61 |
+
### Sample Code
|
62 |
+
'''python
|
63 |
+
from llama_cpp import Llama
|
64 |
+
llm = Llama(model_path="./models/7B/llama-model.gguf")
|
65 |
+
output = llm("Q: Name the planets in the solar system? A: ", max_tokens=32, stop=["Q:", "\n"], echo=True)
|
66 |
+
print(output)
|
67 |
+
'''
|
68 |
+
{
|
69 |
+
"id": "cmpl-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
70 |
+
"object": "text_completion",
|
71 |
+
"created": 1679561337,
|
72 |
+
"model": "./models/7B/llama-model.gguf",
|
73 |
+
"choices": [
|
74 |
+
{
|
75 |
+
"text": "Q: Name the planets in the solar system? A: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto.",
|
76 |
+
"index": 0,
|
77 |
+
"logprobs": None,
|
78 |
+
"finish_reason": "stop"
|
79 |
+
}
|
80 |
+
],
|
81 |
+
"usage": {
|
82 |
+
"prompt_tokens": 14,
|
83 |
+
"completion_tokens": 28,
|
84 |
+
"total_tokens": 42
|
85 |
+
}
|
86 |
+
}
|
87 |
## Intended Use
|
88 |
**Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
|
89 |
|