-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIC-py] usability fixes for llama cookbook
Summary - expose CLI args for paths for easier usage - use extension pypi package - add readme for installation + usage
- Loading branch information
1 parent
f916343
commit 306d468
Showing
4 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Example app using llama aiconfig extension. | ||
|
||
1. Install (example using anaconda) | ||
`conda create -n aiconfig-llama-cookbook` | ||
`conda activate aiconfig-llama-cookbook` | ||
`conda install pip` | ||
`pip install -r python/requirements.txt` | ||
|
||
2. Download a model, e.g. | ||
`curl -L https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q4_K_M.gguf --output ./models/llama-2-7b-chat.Q4_K_M.gguf` | ||
3. cd into cookbook root dir | ||
`$ pwd` | ||
aiconfig/cookbooks/llama | ||
4. Create an AIConfig like this: https://github.com/lastmile-ai/aiconfig/blob/e92e5a3c80b9c2b74a9432f0441318a951d54d0c/cookbooks/llama/llama-aiconfig.json | ||
5. Run with your local paths: | ||
`python python/ask_llama.py --aiconfig-path='../llama/llama-aiconfig.json' --model-path='../../models/llama-2-7b-chat.Q4_K_M.gguf' 2> ask-llama.err` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
|
||
[project] | ||
name = "python-aiconfig-llama-cookbook" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="Jonathan Lessinger", email="[email protected]" }, | ||
] | ||
description = "LLama cookbook using AIConfig Library" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dynamic = ["dependencies"] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/lastmile-ai/aiconfig" | ||
"Bug Tracker" = "https://github.com/lastmile-ai/aiconfig/issues" | ||
|
||
# Black formatting | ||
[tool.black] | ||
line-length = 99 | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
.eggs # exclude a few common directories in the | ||
| .git # root of the project | ||
| .hg | ||
| .mypy_cache | ||
| .tox | ||
| venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
python-aiconfig-llama | ||
python-aiconfig |