Init Model
Browse files- README.md +37 -0
- roberta-model/config.json +28 -0
- roberta-model/model.safetensors +3 -0
README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- English
|
7 |
+
- RoBERTa-base
|
8 |
+
- Text Classification
|
9 |
+
pipeline_tag: text-classification
|
10 |
+
---
|
11 |
+
|
12 |
+
# RoBERTa base Fine-Tuned for Proposal Sentence Classification
|
13 |
+
|
14 |
+
## Overview
|
15 |
+
|
16 |
+
- **Language**: English
|
17 |
+
- **Model Name**: oeg/RoBERTa_Repository_Proposal
|
18 |
+
|
19 |
+
## Description
|
20 |
+
|
21 |
+
This model is a fine-tuned RoBERTa-base model trained to classify sentences into two classes: proposal and non-proposal sentences. The training data includes sentences proposing a software or data repository. The model is trained to recognize and classify these sentences accurately.
|
22 |
+
|
23 |
+
## How to use
|
24 |
+
|
25 |
+
To use this model in Python:
|
26 |
+
|
27 |
+
```python
|
28 |
+
from transformers import RobertaForSequenceClassification, RobertaTokenizer
|
29 |
+
import torch
|
30 |
+
|
31 |
+
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
|
32 |
+
model = RobertaForSequenceClassification.from_pretrained("oeg/RoBERTa_Repository_Proposal/roberta-model")
|
33 |
+
|
34 |
+
sentence = "Your input sentence here."
|
35 |
+
inputs = tokenizer(sentence, return_tensors="pt")
|
36 |
+
outputs = model(**inputs)
|
37 |
+
probabilities = torch.nn.functional.softmax(outputs.logits, dim=1)
|
roberta-model/config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "roberta-base",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "roberta",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 1,
|
21 |
+
"position_embedding_type": "absolute",
|
22 |
+
"problem_type": "single_label_classification",
|
23 |
+
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.35.1",
|
25 |
+
"type_vocab_size": 1,
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 50265
|
28 |
+
}
|
roberta-model/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc9ae6295f93d1d326044a5e2149e933952308fbbb7c00acc260b18ca2cc332d
|
3 |
+
size 498612824
|