Skip to content

[HANDS-ON BUG] #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ss1034 opened this issue Apr 21, 2025 · 2 comments
Open

[HANDS-ON BUG] #441

ss1034 opened this issue Apr 21, 2025 · 2 comments

Comments

@ss1034
Copy link

ss1034 commented Apr 21, 2025

Describe the bug
client.text_generation() throws 503 error every time I use it, however, chat.completion works without any issue

To Reproduce
os.environ["HF_TOKEN"]="my_token"

client = InferenceClient("meta-llama/Llama-3.2-3B-Instruct")

output = client.text_generation(
"The capital of France is",
max_new_tokens=100,
)

print(output)

@ss1034
Copy link
Author

ss1034 commented Apr 21, 2025

Below thing is working: client = InferenceClient(
provider="sambanova",
api_key="my_token",
)

completion = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=[
{
"role": "user",
"content": "What is the capital of France?"
}
],
max_tokens=512,
)

print(completion.choices[0].message.content)

@Oorgien
Copy link

Oorgien commented Apr 24, 2025

TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'

Are you sure that works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants