Skip to content
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

[Startup Plan]: Failed to launch GPU inference #34

Open
Matthieu-Tinycoaching opened this issue Jun 9, 2021 · 3 comments
Open

[Startup Plan]: Failed to launch GPU inference #34

Matthieu-Tinycoaching opened this issue Jun 9, 2021 · 3 comments

Comments

@Matthieu-Tinycoaching
Copy link

Hi community,

I have subscribed a 7-day free trial of the Startup Plan and I wish to test GPU inference API on this model: https://huggingface.co/Matthieu/stsb-xlm-r-multilingual-custom

However, when using the below code:

import json
import requests

API_URL = "https://api-inference.huggingface.co/models/Matthieu/stsb-xlm-r-multilingual-custom"
headers = {"Authorization": "Bearer API_ORG_TOKEN"}

def query(payload):
    data = json.dumps(payload)
    response = requests.request("POST", API_URL, headers=headers, data=data)
    return json.loads(response.content.decode("utf-8"))

payload1 = {"inputs": "Navigateur Web : Ce logiciel permet d'accéder à des pages web depuis votre ordinateur. Il en existe plusieurs téléchargeables gratuitement comme Google Chrome ou Mozilla. Certains sont même déjà installés comme Safari sur Mac OS et Edge sur Microsoft.", "options": {"use_cache": False, "use_gpu": True}}

sentence_embeddings1 = query(payload1)
print(sentence_embeddings1)

I got the following error: {'error': 'Model Matthieu/stsb-xlm-r-multilingual-custom is currently loading', 'estimated_time': 44.490336920000004}

Do I have to wait some time until the model is loaded for GPU inference?

Thanks!

@LysandreJik
Copy link
Member

Maybe of interest to @Narsil

@Narsil
Copy link
Contributor

Narsil commented Jun 9, 2021

Hi @Matthieu-Tinycoaching This is linked to:
#26

Community images do not implement:

  • private models
  • GPU inference
  • Acceleration

So what you are seeing is quite normal and is expected.
If you don't mind we should keep the discussion over there as all 3 are correlated.

@Matthieu-Tinycoaching
Copy link
Author

Matthieu-Tinycoaching commented Jun 9, 2021

Hi @Narsil thanks for the feedback.

However I don't understand so how I can test accelerated inference (CPU+GPU) API on my custom public model?

What is testable so on accelerated inference API and what should I benefit from the free trial startup plan from?

@LysandreJik LysandreJik transferred this issue from huggingface/huggingface_hub Mar 16, 2022
@osanseviero osanseviero transferred this issue from huggingface/hub-docs Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants