YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Quantization made by Richard Erkhov.

Github

Discord

Request more models

NuExtract - GGUF

Name Quant method Size
NuExtract.Q2_K.gguf Q2_K 1.32GB
NuExtract.IQ3_XS.gguf IQ3_XS 1.51GB
NuExtract.IQ3_S.gguf IQ3_S 1.57GB
NuExtract.Q3_K_S.gguf Q3_K_S 1.57GB
NuExtract.IQ3_M.gguf IQ3_M 1.73GB
NuExtract.Q3_K.gguf Q3_K 1.82GB
NuExtract.Q3_K_M.gguf Q3_K_M 1.82GB
NuExtract.Q3_K_L.gguf Q3_K_L 1.94GB
NuExtract.IQ4_XS.gguf IQ4_XS 1.93GB
NuExtract.Q4_0.gguf Q4_0 2.03GB
NuExtract.IQ4_NL.gguf IQ4_NL 2.04GB
NuExtract.Q4_K_S.gguf Q4_K_S 2.04GB
NuExtract.Q4_K.gguf Q4_K 2.23GB
NuExtract.Q4_K_M.gguf Q4_K_M 2.23GB
NuExtract.Q4_1.gguf Q4_1 2.24GB
NuExtract.Q5_0.gguf Q5_0 2.46GB
NuExtract.Q5_K_S.gguf Q5_K_S 2.46GB
NuExtract.Q5_K.gguf Q5_K 2.62GB
NuExtract.Q5_K_M.gguf Q5_K_M 2.62GB
NuExtract.Q5_1.gguf Q5_1 2.68GB
NuExtract.Q6_K.gguf Q6_K 2.92GB
NuExtract.Q8_0.gguf Q8_0 3.78GB

Original model description:

license: mit language: - en base_model: microsoft/Phi-3-mini-4k-instruct

Structure Extraction Model by NuMind 🔥

NuExtract is a version of phi-3-mini, fine-tuned on a private high-quality synthetic dataset for information extraction. To use the model, provide an input text (less than 2000 tokens) and a JSON template describing the information you need to extract.

Note: This model is purely extractive, so all text output by the model is present as is in the original text. You can also provide an example of output formatting to help the model understand your task more precisely.

Try it here: https://huggingface.co/spaces/numind/NuExtract

We also provide a tiny(0.5B) and large(7B) version of this model: NuExtract-tiny and NuExtract-large

Checkout other models by NuMind:

Benchmark

Benchmark 0 shot (will release soon):

Benchmark fine-tunning (see blog post):

Usage

To use the model:

import json
from transformers import AutoModelForCausalLM, AutoTokenizer


def predict_NuExtract(model, tokenizer, text, schema, example=["", "", ""]):
    schema = json.dumps(json.loads(schema), indent=4)
    input_llm =  "<|input|>\n### Template:\n" +  schema + "\n"
    for i in example:
      if i != "":
          input_llm += "### Example:\n"+ json.dumps(json.loads(i), indent=4)+"\n"
    
    input_llm +=  "### Text:\n"+text +"\n<|output|>\n"
    input_ids = tokenizer(input_llm, return_tensors="pt",truncation = True, max_length=4000).to("cuda")

    output = tokenizer.decode(model.generate(**input_ids)[0], skip_special_tokens=True)
    return output.split("<|output|>")[1].split("<|end-output|>")[0]


# We recommend using bf16 as it results in negligable performance loss
model = AutoModelForCausalLM.from_pretrained("numind/NuExtract", torch_dtype=torch.bfloat16, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("numind/NuExtract", trust_remote_code=True)

model.to("cuda")

model.eval()

text = """We introduce Mistral 7B, a 7–billion-parameter language model engineered for
superior performance and efficiency. Mistral 7B outperforms the best open 13B
model (Llama 2) across all evaluated benchmarks, and the best released 34B
model (Llama 1) in reasoning, mathematics, and code generation. Our model
leverages grouped-query attention (GQA) for faster inference, coupled with sliding
window attention (SWA) to effectively handle sequences of arbitrary length with a
reduced inference cost. We also provide a model fine-tuned to follow instructions,
Mistral 7B – Instruct, that surpasses Llama 2 13B – chat model both on human and
automated benchmarks. Our models are released under the Apache 2.0 license.
Code: https://github.com/mistralai/mistral-src
Webpage: https://mistral.ai/news/announcing-mistral-7b/"""

schema = """{
    "Model": {
        "Name": "",
        "Number of parameters": "",
        "Number of max token": "",
        "Architecture": []
    },
    "Usage": {
        "Use case": [],
        "Licence": ""
    }
}"""

prediction = predict_NuExtract(model, tokenizer, text, schema, example=["","",""])
print(prediction)
Downloads last month
307
GGUF
Model size
4B params
Architecture
phi3
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support