Quintu commited on
Commit
f322940
·
verified ·
1 Parent(s): 66ecf26

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +33 -0
  2. config.json +51 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
README.md CHANGED
@@ -1,3 +1,36 @@
1
  ---
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
+ tags:
4
+ - text-classification
5
+ - hazard-detection
6
+ datasets:
7
+ - your-dataset-name
8
  license: apache-2.0
9
+ model_name: Quintu/roberta-large-1024-hazard
10
+ library_name: transformers
11
+ pipeline_tag: text-classification
12
  ---
13
+ # Quintu/roberta-large-1024-hazard
14
+
15
+ Mô hình `Quintu/roberta-large-1024-hazard` được thiết kế để thực hiện phân loại văn bản liên quan đến phát hiện nguy cơ.
16
+
17
+ ## Cách sử dụng
18
+
19
+ Dưới đây là cách sử dụng mô hình này với thư viện `transformers`:
20
+
21
+ ```python
22
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
23
+
24
+ # Tải mô hình và tokenizer
25
+ model_name = "Quintu/roberta-large-1024-hazard"
26
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
27
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
28
+
29
+ # Sử dụng mô hình để phân loại văn bản
30
+ text = "This is an example text to classify."
31
+ inputs = tokenizer(text, return_tensors="pt")
32
+ outputs = model(**inputs)
33
+
34
+ # Dự đoán
35
+ logits = outputs.logits
36
+ print(logits)
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "FacebookAI/roberta-large",
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": 1024,
13
+ "id2label": {
14
+ "0": "allergens",
15
+ "1": "biological",
16
+ "2": "chemical",
17
+ "3": "food additives and flavourings",
18
+ "4": "foreign bodies",
19
+ "5": "fraud",
20
+ "6": "migration",
21
+ "7": "organoleptic aspects",
22
+ "8": "other hazard",
23
+ "9": "packaging defect"
24
+ },
25
+ "initializer_range": 0.02,
26
+ "intermediate_size": 4096,
27
+ "label2id": {
28
+ "allergens": 0,
29
+ "biological": 1,
30
+ "chemical": 2,
31
+ "food additives and flavourings": 3,
32
+ "foreign bodies": 4,
33
+ "fraud": 5,
34
+ "migration": 6,
35
+ "organoleptic aspects": 7,
36
+ "other hazard": 8,
37
+ "packaging defect": 9
38
+ },
39
+ "layer_norm_eps": 1e-05,
40
+ "max_position_embeddings": 514,
41
+ "model_type": "roberta",
42
+ "num_attention_heads": 16,
43
+ "num_hidden_layers": 24,
44
+ "pad_token_id": 1,
45
+ "position_embedding_type": "absolute",
46
+ "torch_dtype": "float32",
47
+ "transformers_version": "4.44.2",
48
+ "type_vocab_size": 1,
49
+ "use_cache": true,
50
+ "vocab_size": 50265
51
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad0f88f963fd4e0b912834d4c9247504727b5f0e6d230c8a30f999997fdb089a
3
+ size 1421528216
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff