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
Close
Hashes for llama_index_llms_text_generation_inference-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c69a718346f058e2514d55064afeb7431a0b4494f9abb4ce7fe328103584e1f2 |
|
MD5 | ed7a4bf25180d4eda331e8c1ef0ebee7 |
|
BLAKE2b-256 | 0ff652a61bc15d4605e192cb24bbd7d7fa2e4daf3c77dad17430b93138f289b0 |
Close
Hashes for llama_index_llms_text_generation_inference-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ed21e1196089fcdccb6f16136f5fec8a20decdb909fb036f9deac20d1a51458 |
|
MD5 | ca1c5bb02e535e0aa69ae6eb74735b26 |
|
BLAKE2b-256 | 4a522d328d9cb7757d67dda861201d95cb657434604103f761c9838c8160999a |