frob/ nuextract-2.0:8b-q8_0

217 1 month ago

vision
ollama run frob/nuextract-2.0:8b-q8_0

Details

1 month ago

14c7649305d0 · 9.5GB ·

qwen25vl
·
8.29B
·
Q8_0
{{- $template := "" }} {{- $input := "" }} {{- $output := "" }} {{- $lastUserIdx := -1 }} {{- range
MIT License Copyright (c) 2025 https://huggingface.co/numind Permission is hereby granted, free of c
{ "temperature": 0.0001 }

Readme

Imported from https://huggingface.co/numind/NuExtract-2.0-8B

#!/usr/bin/env python3

import ollama
import json
import os

model = os.getenv("MODEL", "frob/nuextract-2.0:8b-q8_0")

template = {
  "names":  ["string"],
  "places": ["string"]
}

document = "John went to the restaurant with Mary. James went to the cinema."

examples = {
  "input":  "Stephen is the manager at Susan's store.",
  "output": """{"names": ["STEPHEN", "SUSAN"]}"""
}

messages = [
  {"role": "template",        "content": json.dumps(template)},
  {"role": "examples.input",  "content": examples["input"]},
  {"role": "examples.output", "content": examples["output"]},
  {"role": "user",            "content": document},
]

response = ollama.chat(
    model=model,
    messages=messages
)

print(json.dumps({"model":model,**json.loads(response.message.content)}, indent=4))
$ python3 nuextract.py
{
    "model": "frob/nuextract-2.0:8b-q8_0",
    "names": [
        "JOHN",
        "MARY",
        "JAMES"
    ],
    "places": [
        "restaurant",
        "cinema"
    ]
}