Text Classification
Transformers
Safetensors
English
modernbert
text-generation-inference
unsloth
trl
text-embeddings-inference
Instructions to use neoyipeng/ModernFinBERT-v2-short with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neoyipeng/ModernFinBERT-v2-short with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="neoyipeng/ModernFinBERT-v2-short")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("neoyipeng/ModernFinBERT-v2-short") model = AutoModelForSequenceClassification.from_pretrained("neoyipeng/ModernFinBERT-v2-short") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use neoyipeng/ModernFinBERT-v2-short with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for neoyipeng/ModernFinBERT-v2-short to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for neoyipeng/ModernFinBERT-v2-short to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for neoyipeng/ModernFinBERT-v2-short to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="neoyipeng/ModernFinBERT-v2-short", max_seq_length=2048, )
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- config.json +58 -0
- model.safetensors +3 -0
config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 50281,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "float16",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": null,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"global_rope_theta": 160000.0,
|
| 20 |
+
"gradient_checkpointing": false,
|
| 21 |
+
"hidden_activation": "gelu",
|
| 22 |
+
"hidden_size": 768,
|
| 23 |
+
"id2label": {
|
| 24 |
+
"0": "NEGATIVE",
|
| 25 |
+
"1": "NEUTRAL",
|
| 26 |
+
"2": "POSITIVE"
|
| 27 |
+
},
|
| 28 |
+
"initializer_cutoff_factor": 2.0,
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"intermediate_size": 1152,
|
| 31 |
+
"label2id": {
|
| 32 |
+
"NEGATIVE": 0,
|
| 33 |
+
"NEUTRAL": 1,
|
| 34 |
+
"POSITIVE": 2
|
| 35 |
+
},
|
| 36 |
+
"layer_norm_eps": 1e-05,
|
| 37 |
+
"local_attention": 128,
|
| 38 |
+
"local_rope_theta": 10000.0,
|
| 39 |
+
"max_position_embeddings": 8192,
|
| 40 |
+
"mlp_bias": false,
|
| 41 |
+
"mlp_dropout": 0.0,
|
| 42 |
+
"model_name": "unsloth/ModernBERT-base",
|
| 43 |
+
"model_type": "modernbert",
|
| 44 |
+
"norm_bias": false,
|
| 45 |
+
"norm_eps": 1e-05,
|
| 46 |
+
"num_attention_heads": 12,
|
| 47 |
+
"num_hidden_layers": 22,
|
| 48 |
+
"pad_token_id": 50283,
|
| 49 |
+
"position_embedding_type": "absolute",
|
| 50 |
+
"problem_type": "single_label_classification",
|
| 51 |
+
"repad_logits_with_grad": false,
|
| 52 |
+
"sep_token_id": 50282,
|
| 53 |
+
"sparse_pred_ignore_index": -100,
|
| 54 |
+
"sparse_prediction": false,
|
| 55 |
+
"transformers_version": "4.56.2",
|
| 56 |
+
"unsloth_version": "2026.4.2",
|
| 57 |
+
"vocab_size": 50368
|
| 58 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c45458be2570c160950d5cce89a48f0ca1dbc1f3f103329044372e48a23a10b9
|
| 3 |
+
size 299233108
|