Re:Everything we announced at our first-ever LlamaCon
by galeos on Tuesday April 29, 2025 @03:34PM
(#43837015)
How did you find ModernBERT performance Vs prior BERT models?
Re:Everything we announced at our first-ever LlamaCon
by philipkglass on Tuesday April 29, 2025 @03:44PM
(#43837146)
I didn't try original BERT at all because I didn't get good results from any LLMs on small document excerpts, so I assumed that a substantial context was necessary for good results. Traditional BERT only accepts up to 512 tokens, while ModernBERT goes up to 8192. I ended up using a 2048 token limit.
Re:Everything we announced at our first-ever LlamaCon
by stavros on Tuesday April 29, 2025 @08:21PM
(#43839714)
Would you happen to know of any resources for how to distill a ModernBERT model out of a larger one? I'm interested in doing exactly what you did, but I don't know how to start.
Re:Everything we announced at our first-ever LlamaCon
by philipkglass on Tuesday April 29, 2025 @09:07PM
(#43840076)
I was trying to identify "evergreen" and "time-sensitive" kinds of writing -- basically, I wanted to figure out if web pages captured in 2016 would still have content that's interesting to read today or if the passage of time would have rendered them irrelevant.
Here's the training code that I used to fine-tune ModernBERT from the ~5000 pages I had labeled with Llama 3.3. It should be a good starting point if you have your own fine-tuning task like this. If you can get away with a smaller context than I used here, it will be much faster and the batches can be larger (requires experimentation).
For my task, Llama 3.3 was still the best local model I could run. I tried newer ones (Phi4, Gemma3, Mistral Small) but they produced much worse results. Some larger local models are probably better if you have the hardware for them, but I only have a single 4090 GPU and 128 GB of system RAM.