# Bad request: Task not found for this model

**URL:** <https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179>\
**Category:** Beginners\
**Created:** [January 10, 2025, 5:02pm UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179 "2025-01-10T17:02:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uluhonolulu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/uluhonolulu/32/38954_2.png) [@uluhonolulu](https://discuss.huggingface.co/u/uluhonolulu)\
**Post date:** [January 10, 2025, 5:02pm UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179/1 "2025-01-10T17:02:02Z")

</div>

I’m trying to use HF API for inference using NodeJS SDK. So far, I’m on the free tier but will be happy to pay if required. I’m interested in a few models that are not really popular but they support the Lithuanian language which is important to me.

The problem is that I’m getting “Bad request: Task not found for this model” error.

Here’s my code:

```auto
        const result = await inference.textGeneration({
            model: "neurotechnology/Lt-Llama-2-13b-instruct-hf",
            inputs: prompt,
            parameters: {
                temperature: 0,
            }
        });
        return result.generated_text;

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [January 10, 2025, 5:08pm UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179/2 "2025-01-10T17:08:55Z")

</div>

At present, the free Inference API for HF is not available for minor models, but of course it can be used without a problem from the Endpoint API or other companies’ cloud services.

As for the model in question, it seems that the README.md is not set up properly, and the Task is literally unknown. I think it will work properly if there is a line like the following in the top of README.md.

> **[neurotechnology/Lt-Llama-2-13b-instruct-hf · Hugging Face](https://huggingface.co/neurotechnology/Lt-Llama-2-13b-instruct-hf)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

```markdown
---
pipeline_tag: text-generation
library_name: transformers
---

```

Please contact the author via the Discussion section of the model.

---

<div class="post-metadata">

**Author:** ![uluhonolulu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/uluhonolulu/32/38954_2.png) [@uluhonolulu](https://discuss.huggingface.co/u/uluhonolulu)\
**Post date:** [January 10, 2025, 8:32pm UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179/3 "2025-01-10T20:32:27Z")

</div>

Thank you very much for the clarification!

Can you elaborate on how I can use the Endpoint API? I assumed that what I used (see my code) was exactly that.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [January 11, 2025, 1:34am UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179/4 "2025-01-11T01:34:59Z")

</div>

You’re right. It seems that the way to use the Inference API and Endpoint API is the same in this case. As a last resort, you could copy the repo and modify it yourself, and it would probably work, but it might not be good from a licensing perspective…😅  
It would be easy to run it locally using the local GPU power, but that’s a bit different… Maybe you should let the author know or look for a different model.

> **[🤗 Hugging Face Inference Endpoints](https://huggingface.co/docs/huggingface.js/inference/README)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [January 11, 2025, 1:35pm UTC](https://discuss.huggingface.co/t/bad-request-task-not-found-for-this-model/135179/5 "2025-01-11T13:35:55Z")

</div>

Closed on January 11, 2025, 1:35pm UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
