LlamaIndex LLM Integration: Aleph Alpha
This README details the process of integrating Aleph Alpha's Large Language Models (LLMs) with LlamaIndex. Utilizing Aleph Alpha's API, users can generate completions, facilitate question-answering, and perform a variety of other natural language processing tasks directly within the LlamaIndex framework.
Features
- Text Completion: Use Aleph Alpha LLMs to generate text completions for prompts.
- Model Selection: Access the latest Aleph Alpha models, including the Luminous model family, to generate responses.
- Advanced Sampling Controls: Customize the response generation with parameters like temperature, top_k, top_p, presence_penalty, and more, to fine-tune the creativity and relevance of the generated text.
- Control Parameters: Apply attention control parameters for advanced use cases, affecting how the model focuses on different parts of the input.
Installation
pip install llama-index-llms-alephalpha
Usage
from llama_index.llms.alephalpha import AlephAlpha
-
Request Parameters:
model: Specify the model name (e.g.,luminous-base-control). The latest model version is always used.prompt: The text prompt for the model to complete.maximum_tokens: The maximum number of tokens to generate.temperature: Adjusts the randomness of the completions.top_k: Limits the sampled tokens to the top k probabilities.top_p: Limits the sampled tokens to the cumulative probability of the top tokens.log_probs: Set totrueto return the log probabilities of the tokens.echo: Set totrueto return the input prompt along with the completion.penalty_exceptions: A list of tokens that should not be penalized.n: Number of completions to generate.
-
Advanced Sampling Parameters: (Optional)
presence_penalty&frequency_penalty: Adjust to discourage repetition.sequence_penalty: Reduces likelihood of repeating token sequences.hosting: Option to process the request in Aleph Alpha's own datacenters for enhanced data privacy.
Response Structure
* `model_version`: The name and version of the model used.
* `completions`: A list containing the generated text completion(s) and optional metadata:
* `completion`: The generated text completion.
* `log_probs`: Log probabilities of the tokens in the completion.
* `raw_completion`: The raw completion without any post-processing.
* `completion_tokens`: Completion split into tokens.
* `finish_reason`: Reason for completion termination.
* `num_tokens_prompt_total`: Total number of tokens in the input prompt.
* `num_tokens_generated`: Number of tokens generated in the completion.
Example
Refer to the example notebook for a comprehensive guide on generating text completions with Aleph Alpha models in LlamaIndex.
API Documentation
For further details on the API and available models, please consult Aleph Alpha's API Documentation.
Metadata
Release files for llama-index-llms-alephalpha 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_llms_alephalpha-0.6.0.tar.gz | 7.3 kB | Without provenance | Details for llama_index_llms_alephalpha-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_llms_alephalpha-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_llms_alephalpha-0.6.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / llama_index_llms_alephalpha-0.6.0.tar.gz
| Download URL | llama_index_llms_alephalpha-0.6.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9bc15aaba02050fe8576e3bfe97bc9cffe48f6a320fb8f1e8937ffe1d89d54a
|
|
BLAKE2b-256 checksum How to use checksums |
7f814a541301fec65b37ecdb75c967538c2547c68db67d2fb9df6b253d91980a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_llms_alephalpha-0.6.0-py3-none-any.whl
| Download URL | llama_index_llms_alephalpha-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9559e96ba7e7baa13bf8175088a33a733de3938dd7e75f0534d0219d4cfe4960
|
|
BLAKE2b-256 checksum How to use checksums |
6a876e60d61083c881d2569522721be9449af768b2ce273e6b8ab81793a52328
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-llms-alephalpha 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.