Run this model with HF Jobs

Run TextMachineProject/NewsBERT_1850_1875_lora_3epochs 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/TextMachineProject/NewsBERT_1850_1875_lora_3epochs. 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/TextMachineProject/NewsBERT_1850_1875_lora_3epochs 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.
How to use from the
Use from the
PEFT library
from peft import PeftModel
from transformers import AutoModel

base_model = AutoModel.from_pretrained("TextMachineProject/NewsBERT_1800-1920")
model = PeftModel.from_pretrained(base_model, "TextMachineProject/NewsBERT_1850_1875_lora_3epochs")

NewsBERT 1850–1875 LoRA adapter (3 epochs)

A LoRA adapter for TextMachineProject/NewsBERT_1800-1920, fine-tuned for three epochs on newspaper text (1850–1875) from the Heritage Made Digital (HMD14) and Living with Machines (LwM) collections.

Training details

  • Period: 1850–1875
  • Base model: TextMachineProject/NewsBERT_1800-1920
  • Method: LoRA (PEFT), target modules: query, value, word_embeddings
  • LoRA rank: 16, alpha: 32, dropout: 0.05
  • Task: Masked Language Modelling (15% masking probability)
  • Sequence length: 128 tokens (sliding window, stride 96)
  • Epochs: 3
  • Batch size: 256

Usage

from transformers import AutoTokenizer, AutoModelForMaskedLM
from peft import PeftModel

base = AutoModelForMaskedLM.from_pretrained("TextMachineProject/NewsBERT_1800-1920")
tokenizer = AutoTokenizer.from_pretrained("TextMachineProject/NewsBERT_1800-1920")
model = PeftModel.from_pretrained(base, "TextMachineProject/NewsBERT_1850_1875_lora_3epochs")
Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for TextMachineProject/NewsBERT_1850_1875_lora_3epochs

Adapter
(10)
this model