llama-index llms huggingface text generation inference integration
Project description
LlamaIndex Llms Integration: Text Generation Inference
Integration with Text Generation Inference from Hugging Face to generate text.
Installation
pip install llama-index-llms-text-generation-inference
Usage
from llama_index.llms.text_generation_inference import TextGenerationInference
llm = TextGenerationInference(
model_name="openai-community/gpt2",
temperature=0.7,
max_tokens=100,
token="<your-token>", # Optional
)
response = llm.complete("Hello, how are you?")
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
File details
Details for the file llama_index_llms_text_generation_inference-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_text_generation_inference-0.3.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac3a786da5eb1905fd4e85d430f68c3e797d298cbe00617de21fa8a43b72c1b9 |
|
MD5 | e0325d230f9a539030c547e67194baf9 |
|
BLAKE2b-256 | aefca3d7379f236559c70b9ba4de1ed082a0f6461b3de4caf7acb771f0c342dc |
File details
Details for the file llama_index_llms_text_generation_inference-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_text_generation_inference-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d5d8c84791ebd140a79489d869efb8bccf2f0bbf60cc9bafe5bb3bc09d22ad |
|
MD5 | c9590e77ca772589aecc0f16f7f8a3b4 |
|
BLAKE2b-256 | 41567ca8a1a9ff3941723bfb67236fd43f2538990f668cf822ceb6165e3c2250 |