Run this model with HF Jobs
Run raphaelsty/carbonblog 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/raphaelsty/carbonblog. 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/raphaelsty/carbonblog 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 raphaelsty/carbonblog with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raphaelsty/carbonblog with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="raphaelsty/carbonblog")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("raphaelsty/carbonblog") model = AutoModelForQuestionAnswering.from_pretrained("raphaelsty/carbonblog", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Extractive Question Answering application.
import re
from transformers import pipeline
qa = pipeline(
"question-answering", model="raphaelsty/carbonblog", tokenizer="raphaelsty/carbonblog"
)
def clean(document):
"""Pre-process the document."""
document = re.sub("[^a-zA-Z0-9 \n\.]", " ", document)
document = re.sub("\s\s+", " ", document)
# [NONE] allows the model to handle missing components.
document = f"[NONE] {document.lower()}"
return document
document = clean("body: 83% nylon 17% spandex; lace: 86% nylon 14% spandex")
qa({"question": "What is the 1 component ?", "context": document})
{"score": 0.9999976754188538, "start": 32, "end": 36, "answer": "lace"}
- Downloads last month
- 27