[Python] ollama.generate raises model not found error:...

Discussão em 'Python' iniciado por Stack, Maio 4, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to run a Python script that uses the ollama library to generate responses from a custom LLM model. My code attempts to call ollama.generate() using the following model name:

    chosen_model = 'hf.co/mradermacher/Llama-3.2-3B-Instruct-uncensored-GGUF'



    def extract_keyword(prompt):
    response = ollama.generate(
    model=chosen_model,
    prompt=f"Identify the product/item in {prompt}. ..."
    )
    return response.get('response', '').strip()


    I have ollama installed and running locally, and other standard models work fine.


    • Is 'hf.co/mradermacher/Llama-3.2-3B-Instruct-uncensored-GGUF' a valid model name for use with ollama?


    • Do I need to pull the model manually using ollama pull or convert it in some way?


    • How can I verify the availability or compatibility of a model with ollama?

    Error[​IMG]

    Any help to resolve this would be appreciated!

    Continue reading...

Compartilhe esta Página