blockblockblock / NuExtract-bpw4.8-exl2

huggingface.co
Total runs: 19
24-hour runs: -1
7-day runs: -5
30-day runs: 7
Model's Last Updated: July 02 2024
text-generation

Introduction of NuExtract-bpw4.8-exl2

Model Details of NuExtract-bpw4.8-exl2

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)

Runs of blockblockblock NuExtract-bpw4.8-exl2 on huggingface.co

19
Total runs
-1
24-hour runs
-3
3-day runs
-5
7-day runs
7
30-day runs

More Information About NuExtract-bpw4.8-exl2 huggingface.co Model

More NuExtract-bpw4.8-exl2 license Visit here:

https://choosealicense.com/licenses/mit

NuExtract-bpw4.8-exl2 huggingface.co

NuExtract-bpw4.8-exl2 huggingface.co is an AI model on huggingface.co that provides NuExtract-bpw4.8-exl2's model effect (), which can be used instantly with this blockblockblock NuExtract-bpw4.8-exl2 model. huggingface.co supports a free trial of the NuExtract-bpw4.8-exl2 model, and also provides paid use of the NuExtract-bpw4.8-exl2. Support call NuExtract-bpw4.8-exl2 model through api, including Node.js, Python, http.

blockblockblock NuExtract-bpw4.8-exl2 online free

NuExtract-bpw4.8-exl2 huggingface.co is an online trial and call api platform, which integrates NuExtract-bpw4.8-exl2's modeling effects, including api services, and provides a free online trial of NuExtract-bpw4.8-exl2, you can try NuExtract-bpw4.8-exl2 online for free by clicking the link below.

blockblockblock NuExtract-bpw4.8-exl2 online free url in huggingface.co:

https://huggingface.co/blockblockblock/NuExtract-bpw4.8-exl2

NuExtract-bpw4.8-exl2 install

NuExtract-bpw4.8-exl2 is an open source model from GitHub that offers a free installation service, and any user can find NuExtract-bpw4.8-exl2 on GitHub to install. At the same time, huggingface.co provides the effect of NuExtract-bpw4.8-exl2 install, users can directly use NuExtract-bpw4.8-exl2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

NuExtract-bpw4.8-exl2 install url in huggingface.co:

https://huggingface.co/blockblockblock/NuExtract-bpw4.8-exl2

Url of NuExtract-bpw4.8-exl2

Provider of NuExtract-bpw4.8-exl2 huggingface.co

blockblockblock
ORGANIZATIONS

Other API from blockblockblock