Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_packs_zephyr_query_engine-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_packs_zephyr_query_engine-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fb5989bf3f15d38638ad6567a534d5e96f4468ff7a491d145a6849d33c0e1d72
MD5 941d2ae3d08ab9eee0d7d33f453c7e61
BLAKE2b-256 9ef19483077f9456e65e2e2ae34f02ce5c56194ed7263b88d14f663375fc4889

See more details on using hashes here.

File details

Details for the file llama_index_packs_zephyr_query_engine-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_packs_zephyr_query_engine-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 545f72d127e3656cd387e40b0bb2ef74cca6209f8deb817144c4e631a85e75e6
MD5 82b7c5e8a7eefd4831acbdb2be945b21
BLAKE2b-256 95818cb108403d0eefd20e23716d2a483aa3bb2fa21c93196e1ed0fff0b16f48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page