llama-index packs zephyr_query_engine integration
Project description
Zephyr Query Engine Pack
Create a query engine using completely local and private models -- HuggingFaceH4/zephyr-7b-beta for the LLM and BAAI/bge-base-en-v1.5 for embeddings.
CLI Usage
You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:
llamaindex-cli download-llamapack ZephyrQueryEnginePack --download-dir ./zephyr_pack
You can then inspect the files at ./zephyr_pack and use them as a template for your own project.
Code Usage
You can download the pack to a the ./zephyr_pack directory:
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
ZephyrQueryEnginePack = download_llama_pack(
"ZephyrQueryEnginePack", "./zephyr_pack"
)
# You can use any llama-hub loader to get documents!
zephyr_pack = ZephyrQueryEnginePack(documents)
From here, you can use the pack, or inspect and modify the pack in ./zephyr_pack.
The run() function is a light wrapper around index.as_query_engine().query().
response = zephyr_pack.run(
"What did the author do growing up?", similarity_top_k=2
)
You can also use modules individually.
# Use the llm
llm = zephyr_pack.llm
response = llm.complete("What is HuggingFace?")
# Use the index directly
index = zephyr_pack.index
query_engine = index.as_query_engine()
retriever = index.as_retriever()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_packs_zephyr_query_engine-0.3.0.tar.gz.
File metadata
- Download URL: llama_index_packs_zephyr_query_engine-0.3.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da3bbadbb1143445ee9f4d244b831de40fdee3a14d0e22bac6db95d08d5b270c
|
|
| MD5 |
3f58d04753ba608b93e4c447e6fb9063
|
|
| BLAKE2b-256 |
ba5b2a2d8f311dfb93bf91ee6c2f39c16a7be8487edca9885929ccaf2dc6c4a0
|
File details
Details for the file llama_index_packs_zephyr_query_engine-0.3.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_packs_zephyr_query_engine-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
785e48578666a396cb435ed5726addff1225948f1eda9a5e93b3f181d322ce58
|
|
| MD5 |
2e6582002f1299a62153d0e664c9ac03
|
|
| BLAKE2b-256 |
e883339d5c4fc5600ce5ad6efd2d38526435e5fa24970e7934904331881d50a8
|