Downloads · 30 days
13
19% of all-time downloads
pszemraj/deberta-v3-small-sp500-edgar-10k
deberta-v3-small-sp500-edgar-10k is a text classification model from pszemraj. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
13
19% of all-time downloads
All-time downloads
67
Public
Parameters
142M
570 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors568 MB · 98%
From the Hugging Face model README
this predicts the ret column of the training dataset, given the text column.
import json
from transformers import pipeline
from huggingface_hub import hf_hub_download
model_repo_name = "pszemraj/deberta-v3-small-sp500-edgar-10k"
pipe = pipeline("text-classification", model=model_repo_name)
pipe.tokenizer.model_max_length = 1024
# Download the regression_config.json file
regression_config_path = hf_hub_download(
repo_id=model_repo_name, filename="regression_config.json"
)
with open(regression_config_path, "r") as f:
regression_config = json.load(f)
def inverse_scale(prediction, config):
"""apply inverse scaling to a prediction"""
min_value, max_value = config["min_value"], config["max_value"]
return prediction * (max_value - min_value) + min_value
def predict_with_pipeline(text, pipe, config, ndigits=5):
result = pipe(text, truncation=True)[0]
scaled_score = inverse_scale(result['score'], config)
return round(scaled_score, ndigits)
text = "This is an example text for regression prediction."
# Get predictions
predictions = predict_with_pipeline(text, pipe, regression_config)
print("Predicted Value:", predictions)
</details>
This model is a fine-tuned version of microsoft/deberta-v3-small on BEE-spoke-data/sp500-edgar-10k-markdown
It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Mse |
|---|---|---|---|---|
| 0.0064 | 0.54 | 50 | 0.0006 | 0.0006 |
| 0.0043 | 1.08 | 100 | 0.0005 | 0.0005 |
| 0.0028 | 1.61 | 150 | 0.0006 | 0.0006 |
| 0.0025 | 2.15 | 200 | 0.0005 | 0.0005 |
| 0.0025 | 2.69 | 250 | 0.0005 | 0.0005 |