Run this model with HF Jobs
Run konverner/8bit-distilcamembert-base-ner 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/konverner/8bit-distilcamembert-base-ner. 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/konverner/8bit-distilcamembert-base-ner 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 konverner/8bit-distilcamembert-base-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use konverner/8bit-distilcamembert-base-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="konverner/8bit-distilcamembert-base-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("konverner/8bit-distilcamembert-base-ner") model = AutoModelForTokenClassification.from_pretrained("konverner/8bit-distilcamembert-base-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
This is an 8bit version of distilcamembert-base-ner obtained with Intel® Neural Compressor on wikiner_fr dataset.
Get Started
First, install libraries:
pip install --upgrade-strategy eager "optimum[neural-compressor]" > null
Second, use INCModelForTokenClassification from optimum.intel . It can be used in the similar way as
an ordinary DistilBertForTokenClassification:
from transformers import AutoModelForTokenClassification, AutoTokenizer
from optimum.intel import INCModelForTokenClassification
model = INCModelForTokenClassification.from_pretrained('konverner/8bit-distilcamembert-base-ner')
tokenizer = AutoTokenizer.from_pretrained('konverner/8bit-distilcamembert-base-ner')
text = "Meta Platforms ou Meta, anciennement connue sous le nom de Facebook, est une multinationale américaine fondée en 2004 par Mark Zuckerberg."
model_input = tokenizer(text, return_tensors='pt')
model_output = model(**model_input)
print(model_output.logits.argmax(2))
# tensor([[0, 4, 4, 4, 4, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0,
# 0, 0, 0, 2, 2, 2, 2, 2, 0, 0]])
- Downloads last month
- 6