Files
Qwen2.5-Coder-14B-n8n-Workf…/README.md
ModelHub XC fca4cc8081 初始化项目,由ModelHub XC社区提供模型
Model: robertspumiaca1975/Qwen2.5-Coder-14B-n8n-Workflow-Generator
Source: Original Platform
2026-09-12 18:46:20 +08:00

125 lines
3.5 KiB
Markdown

---
license: apache-2.0
base_model: Qwen/Qwen2.5-Coder-14B-Instruct
tags:
- n8n
- workflow
- automation
- fine-tuned
- code-generation
- qlora
datasets:
- mbakgun/n8nbuilder-n8n-workflows-dataset
pipeline_tag: text-generation
language:
- en
library_name: mlx
---
# Qwen2.5-Coder-14B-n8n-Workflow-Generator
![n8nbuilder.dev](./img-assets/header.jpg)
Fine-tuned Qwen2.5-Coder-14B-Instruct model specialized for generating n8n workflow JSONs from natural language descriptions.
## Model Description
This model is a QLoRA fine-tuned version of [Qwen/Qwen2.5-Coder-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct) on the [n8nbuilder-n8n-workflows-dataset](https://huggingface.co/datasets/mbakgun/n8nbuilder-n8n-workflows-dataset), containing +2.5K n8n workflow templates.
**Training Details:**
- **Base Model**: Qwen/Qwen2.5-Coder-14B-Instruct
- **Method**: QLoRA (4-bit quantization)
- **LoRA Rank**: 32
- **LoRA Alpha**: 64
- **Training Steps**: 432 (3 epochs)
- **Sequence Length**: 8192 tokens
- **Learning Rate**: 2e-4
## Usage
### Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "mbakgun/Qwen2.5-Coder-14B-n8n-Workflow-Generator"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
system_prompt = "You are an expert n8n workflow generation assistant. Your goal is to create valid, efficient, and functional n8n workflow configurations."
user_input = "Create a workflow that monitors a RSS feed and sends new items to Discord."
prompt = f"{system_prompt}\n\n{user_input}"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=4096,
temperature=0.7,
do_sample=True
)
workflow_json = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(workflow_json)
```
### MLX (Apple Silicon)
```bash
# Download MLX Q4 model
mlx_lm.generate \
--model mbakgun/Qwen2.5-Coder-14B-n8n-Workflow-Generator/mlx-q4 \
--prompt "You are an expert n8n workflow generation assistant...\n\nCreate a workflow that sends Slack notifications when GitHub issues are created." \
--max-tokens 4096
```
## Training Data
This model was fine-tuned on the [n8nbuilder-n8n-workflows-dataset](https://huggingface.co/datasets/mbakgun/n8nbuilder-n8n-workflows-dataset), which contains:
- **+2,304 workflow templates** (after filtering sequences >8192 tokens)
- Format: Alpaca (instruction/input/output)
- Source: n8n.io public template gallery
- [n8nbuilder.dev - Create n8n Workflows in Seconds with AI](https://n8nbuilder.dev)
## Performance
- **Training Speed**: ~33.85s/step on H100 PCIe
- **VRAM Usage**: ~30GB (4-bit QLoRA)
- **Inference**: ~25-40 tok/s on Mac Mini M4 64GB (MLX)
## Limitations
- Generated workflows may require manual validation
- Long workflows (>8192 tokens) may be truncated
- Model trained on public templates only
## Citation
```bibtex
@model{qwen25_coder_n8n_2025,
title={Qwen2.5-Coder-14B-n8n-Workflow-Generator},
author={mbakgun},
year={2025},
base_model={Qwen/Qwen2.5-Coder-14B-Instruct},
dataset={mbakgun/n8nbuilder-n8n-workflows-dataset},
url={https://huggingface.co/mbakgun/Qwen2.5-Coder-14B-n8n-Workflow-Generator}
}
```
## Acknowledgments
- [Qwen Team](https://huggingface.co/Qwen) for the base model
- [n8n](https://n8n.io) for the workflow automation platform
- [n8n-mcp](https://github.com/czlonkowski/n8n-mcp) for template indexing
## License
Apache 2.0