Run this model with HF Jobs
Run ProdicusII/ZeroShotBioNER on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ProdicusII/ZeroShotBioNER. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ProdicusII/ZeroShotBioNER on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ProdicusII/ZeroShotBioNER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProdicusII/ZeroShotBioNER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ProdicusII/ZeroShotBioNER")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ProdicusII/ZeroShotBioNER") model = AutoModelForTokenClassification.from_pretrained("ProdicusII/ZeroShotBioNER", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
7edec27
1
Parent(s): 6fc7d66
Update README.md
Browse files23 unmodified lines2425262728293031323323 unmodified lines## Model descriptionModel takes as input two strings. String1 is NER label. String1 must be phrase for entity. String2 is short text where String1 is searched for semantically.model outputs list of zeros and ones corresponding to the occurance of NER and corresponing to tokens(tokens given by transformer tokenizer) of the Sring2, not to words.## Example of usage## Code availibilityCode used for training and testing the model is available at https://github.com/br-ai-ns-institute/Zero-ShotNER23 unmodified lines24252627282930313233343536373839404142434423 unmodified lines## Model descriptionModel takes as input two strings. String1 is NER label. String1 must be phrase for entity. String2 is short text where String1 is searched for semantically.model outputs list of zeros and ones corresponding to the occurance of Named Entity and corresponing to the tokens(tokens given by transformer tokenizer) of the Sring2.## Example of usagefrom transformers import AutoTokenizermodelname='./' #modelpathtokenizer = AutoTokenizer.from_pretrained(modelname) ## loading the tokenizer of that modelstring1='Drug'string2='No recent antibiotics or other nephrotoxins, and no symptoms of UTI with benign UA.'encodings = tokenizer(string1,string2, is_split_into_words=False,padding=True, truncation=True, add_special_tokens=True, return_offsets_mapping=False,max_length=512,return_tensors='pt')from transformers import BertForTokenClassification #AutoModelForPreTrainingmodel = BertForTokenClassification.from_pretrained(modelname, num_labels=2)prediction_logits=model(**encodings)## Code availibilityCode used for training and testing the model is available at https://github.com/br-ai-ns-institute/Zero-ShotNER
README.md+12-1