[Python] OSError while trying to use HuggingFace for open source models

Discussão em 'Python' iniciado por Stack, Março 7, 2025.

  1. Stack

    Stack Membro Participativo

    # Use a pipeline as a high-level helper
    from transformers import pipeline

    messages = [
    {"role": "user",
    "content": """your task is to generate 6 scenes each of 6 seconds on topic of Mughal empire.
    make it in a structured way with individual title for each heading."""}]
    pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Distill-Llama-70B")
    pipe(messages)


    I have tried adding my token on both GPU and CPU parts. But I want to use the model efficiently on CPU. How do I fix it?

    Continue reading...

Compartilhe esta Página