Skip to main content

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

File hashes

Hashes for llama_index_llms_text_generation_inference-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ac3a786da5eb1905fd4e85d430f68c3e797d298cbe00617de21fa8a43b72c1b9
MD5 e0325d230f9a539030c547e67194baf9
BLAKE2b-256 aefca3d7379f236559c70b9ba4de1ed082a0f6461b3de4caf7acb771f0c342dc

See more details on using hashes here.

File details

Details for the file llama_index_llms_text_generation_inference-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_text_generation_inference-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29d5d8c84791ebd140a79489d869efb8bccf2f0bbf60cc9bafe5bb3bc09d22ad
MD5 c9590e77ca772589aecc0f16f7f8a3b4
BLAKE2b-256 41567ca8a1a9ff3941723bfb67236fd43f2538990f668cf822ceb6165e3c2250

See more details on using hashes here.

Supported by

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