- llama-index-HF-chainin-tool
- Example motivation code for making llamas work for you!
- Generate data from source (Wiki, Youtube, Reddit)
- Run model with generated JSON extension.
NO API KEY NEEDED
requirements:
- llama model
- python3 & pip
- Huggingface embeded model - downloadable via pip
- Create file "run_env.py" containing path to model example: path_to_model="path/to/model/model.bin"
- Install needed packages
Two-stage-usage: In order to run two-stage loaders you need two scripts first one to load data into index and then those indexes to graph Then you use second script to query the graph from previous step.
- Make sure your run_env.py is properly created!! (see example in this file)
- if using complicated inputArray, such as list of URL's, considere makinh another list for summary texts, special characters may break the string, and then the whole run.
Multi-stage: Ran in two parts.
- Download the data and make indexes
- save indexes to disk
- Indexes and datasets can be reused from file
- Shorter runtime
- More complex
Single stage. All in one
- Select datasources and run
- Save result to disk
- Simple
Original: Archive - hard-working-llama: Dataloader: Wikipedia - array Model: Llama 7B (tested) Embeded model: Embeded Huggingface
Wiki, youtube, pds. ...
- see loaders.md for loaders
example run_env.py:
path_to_model="path/to/model/model.bin"
LlamaArgs = {
"model_path": path_to_model,
"n_ctx": 2048,
}