Hugging Face Model Agent
hf_model_agent · Built-in agent recipeAnnotation agent running a fine-tuned Hugging Face transformers model on your cluster. Annotates named entities (NER) and spans with a token-classification model, or text categories with a text-classification model.
If you've connected Ellf to your coding assistant, it can set up the agent for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up an agent
› Set up an Ellf agent using the Hugging Face Model Agent recipe (hf_model_agent) and assign it to my annotation task.- In the app, go to AgentsNew agent.
- Select the Hugging Face Model Agent recipe under APIs.
- Fill in the form – you'll need to provide Model. Everything else has sensible defaults.
- Assign the agent to a task via AgentAdd to tasks, or add it from the task via TaskAdd agents.
Create the agent with ellf agents create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf agents create hf_model_agent --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the agent | None |
--model-hf-hub.repo-id | str | Hugging Face model name: Model ID on huggingface.co, e.g. dslim/bert-base-NER.One option for Model | None |
--model-hf-hub.revision | str | Hugging Face model revision: Branch, tag or commit to use. Pin a commit so a restart can't change behavior.One option for Model | "main" |
--model-hf-model | str | Hugging Face model on your cluster: A Hugging Face checkpoint on your cluster, downloaded from the Hub or fine-tuned on your annotations.One option for Model | None |
--hf-token | str | Hugging Face token: Your own HF token, stored as an Ellf secret. Only needed for gated or private models. | None |
--label-map | str | Label map (JSON): Model label → task label, e.g. {"PER": "PERSON", "LOC": "GPE"}. The job log lists the model's labels at startup. Not needed for a model fine-tuned on this task's labels. | "" |
--min-score | float | Minimum score: Spans below this are dropped; for classification, the accept threshold. | 0.5 |
--reject-below | float | Reject below: Binary classification only: reject at or below this score. Set it lower than the minimum score to ignore the uncertain band between. | 0.5 |
--icon | str | Icon: Avatar shown for this agent's annotations.Available: bot, openai, gemini, claude, huggingface, mistral, ollama, wand, zap, tag, cpu | "huggingface" |
--aggregation-strategy | str | Subword aggregation: How subword predictions merge into entities (NER models only).Available: simple, first, average, max | "simple" |
--poll-interval | float | Poll interval (seconds) | 1 |
--idle-shutdown-seconds | float | Idle shutdown (seconds): Stops the agent after it's been idle for this many seconds (0 = keep running). | 0 |
--project-id | str | Project ID to add agent to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the agent on, as configured on your cluster | None |