Dawoodthouseef
commited on
Commit
•
4224940
1
Parent(s):
d49d052
Update README.md
Browse files
README.md
CHANGED
@@ -54,17 +54,20 @@ 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 |
-
pip install llama-cpp-python==0.2.6
|
59 |
-
'''
|
60 |
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
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",
|
@@ -84,6 +87,7 @@ print(output)
|
|
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 |
|
|
|
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 |
+
|
59 |
+
```
|
60 |
+
pip install llama-cpp-python==0.2.6
|
61 |
+
```
|
62 |
+
Then you can use the model like this:
|
63 |
+
```python
|
64 |
from llama_cpp import Llama
|
65 |
llm = Llama(model_path="./models/7B/llama-model.gguf")
|
66 |
output = llm("Q: Name the planets in the solar system? A: ", max_tokens=32, stop=["Q:", "\n"], echo=True)
|
67 |
print(output)
|
68 |
+
```
|
69 |
+
###EXample Output of the above code
|
70 |
+
```
|
71 |
{
|
72 |
"id": "cmpl-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
73 |
"object": "text_completion",
|
|
|
87 |
"total_tokens": 42
|
88 |
}
|
89 |
}
|
90 |
+
```
|
91 |
## Intended Use
|
92 |
**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.
|
93 |
|