[GH-ISSUE #5875] Wrong template for NuExtract model #3664

Closed
opened 2026-04-12 14:27:36 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @adam-the on GitHub (Jul 23, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5875

The template for this model should be more like:

{{- range .Messages }}
{{- if eq .Role "user" }}<|input|>
{{ .Content }}<|output|>
{{- else if eq .Role "assistant" }}
{{ .Content }} <|end-output|>
{{- end }}
{{- end }}

I put a space before the <|end-output|> token as recommended here.
Reference: https://huggingface.co/numind/NuExtract#usage

And the stop params file should contain these entries:

<|endoftext|>
<|assistant|>
<|end|>
<|end-output|>

Reference: https://huggingface.co/numind/NuExtract/blob/main/generation_config.json

After making these changes in my local Modelfile, the model functions as expected.

Ollama version

0.2.8

Originally created by @adam-the on GitHub (Jul 23, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5875 The template for this model should be more like: ``` {{- range .Messages }} {{- if eq .Role "user" }}<|input|> {{ .Content }}<|output|> {{- else if eq .Role "assistant" }} {{ .Content }} <|end-output|> {{- end }} {{- end }} ``` I put a space before the `<|end-output|>` token as recommended [here](https://huggingface.co/numind/NuExtract/discussions/8). <sub>Reference: https://huggingface.co/numind/NuExtract#usage</sub> And the stop params file should contain these entries: ``` <|endoftext|> <|assistant|> <|end|> <|end-output|> ``` <sub>Reference: https://huggingface.co/numind/NuExtract/blob/main/generation_config.json</sub> After making these changes in my local Modelfile, the model functions as expected. ### Ollama version 0.2.8
GiteaMirror added the bug label 2026-04-12 14:27:36 -05:00
Author
Owner

@adam-the commented on GitHub (Jul 23, 2024):

Additionally, it would be nice if the README could be updated to include an example of the model's usage:

### Template:
{
  "Person's Name": "",
  "Person's Age": ""
}

### Example:
{
  "Person's Name": "John Smith",
  "Person's Age": "20"
}

### Text:
My name is Jane Doe and I am 30.

Including an example is optional, multiple examples can be provided if wanted, each example should be under the header: "### Example:"

<!-- gh-comment-id:2245349837 --> @adam-the commented on GitHub (Jul 23, 2024): Additionally, it would be nice if the README could be updated to include an example of the model's usage: ``` ### Template: { "Person's Name": "", "Person's Age": "" } ### Example: { "Person's Name": "John Smith", "Person's Age": "20" } ### Text: My name is Jane Doe and I am 30. ``` Including an example is optional, multiple examples can be provided if wanted, each example should be under the header: "### Example:"
Author
Owner

@joshyan1 commented on GitHub (Jul 23, 2024):

Thanks for the notice! We'll be updating the model momentarily.

<!-- gh-comment-id:2245922552 --> @joshyan1 commented on GitHub (Jul 23, 2024): Thanks for the notice! We'll be updating the model momentarily.
Author
Owner

@jmorganca commented on GitHub (Sep 4, 2024):

Hi there, I believe this has been fixed. If that isn't the case please let me know.

<!-- gh-comment-id:2327853609 --> @jmorganca commented on GitHub (Sep 4, 2024): Hi there, I believe this has been fixed. If that isn't the case please let me know.
Author
Owner

@ProjectMoon commented on GitHub (Sep 4, 2024):

https://ollama.com/library/nuextract/blobs/e3e379c2858c is this the current template?

<!-- gh-comment-id:2328879682 --> @ProjectMoon commented on GitHub (Sep 4, 2024): https://ollama.com/library/nuextract/blobs/e3e379c2858c is this the current template?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3664