FM
FlowMarket
General Automation Beginner ⚡ 4 n8n Nodes

Use an open-source LLM via HuggingFace

This workflow demonstrates how to connect an open-source model to a Basic LLM node. The workflow is triggered when a new manual chat message appears. The mes...

🔌 Nodes & Integrations Used (1)

n8n Core Logic

📖 Implementation & Setup Guide

This workflow demonstrates how to connect an open-source model to a Basic LLM node.

The workflow is triggered when a new manual chat message appears. The message is then run through a Language Model Chain that is set up to process text with a specific prompt to guide the model's responses.

Note that open-source LLMs with a small number of parameters require slightly different prompting with more guidance to the model.

You can change the default Mistral-7B-Instruct-v0.1 model to any other LLM supported by HuggingFace. You can also connect other nodes, such as Ollama.

Note that to use this template, you need to be on n8n version 1.19.4 or later.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Use an open-source LLM _via HuggingFace_.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related General Automation Workflows

View All in General Automation →