Quintu commited on
Commit
6a63b69
·
verified ·
1 Parent(s): 9265c7f

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +33 -0
  2. config.json +75 -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
+ - product-detection
6
+ datasets:
7
+ - your-dataset-name
8
  license: apache-2.0
9
+ model_name: Quintu/roberta-large-1024-product
10
+ library_name: transformers
11
+ pipeline_tag: text-classification
12
  ---
13
+ # Quintu/roberta-large-1024-product
14
+
15
+ Mô hình `Quintu/roberta-large-1024-product` được thiết kế để thực hiện phân loại văn bản liên quan đến phát hiện loại sản phẩm.
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-product"
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,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "alcoholic beverages",
15
+ "1": "cereals and bakery products",
16
+ "2": "cocoa and cocoa preparations, coffee and tea",
17
+ "3": "confectionery",
18
+ "4": "dietetic foods, food supplements, fortified foods",
19
+ "5": "fats and oils",
20
+ "6": "feed materials",
21
+ "7": "food additives and flavourings",
22
+ "8": "food contact materials",
23
+ "9": "fruits and vegetables",
24
+ "10": "herbs and spices",
25
+ "11": "honey and royal jelly",
26
+ "12": "ices and desserts",
27
+ "13": "meat, egg and dairy products",
28
+ "14": "non-alcoholic beverages",
29
+ "15": "nuts, nut products and seeds",
30
+ "16": "other food product / mixed",
31
+ "17": "pet feed",
32
+ "18": "prepared dishes and snacks",
33
+ "19": "seafood",
34
+ "20": "soups, broths, sauces and condiments",
35
+ "21": "sugars and syrups"
36
+ },
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 4096,
39
+ "label2id": {
40
+ "alcoholic beverages": 0,
41
+ "cereals and bakery products": 1,
42
+ "cocoa and cocoa preparations, coffee and tea": 2,
43
+ "confectionery": 3,
44
+ "dietetic foods, food supplements, fortified foods": 4,
45
+ "fats and oils": 5,
46
+ "feed materials": 6,
47
+ "food additives and flavourings": 7,
48
+ "food contact materials": 8,
49
+ "fruits and vegetables": 9,
50
+ "herbs and spices": 10,
51
+ "honey and royal jelly": 11,
52
+ "ices and desserts": 12,
53
+ "meat, egg and dairy products": 13,
54
+ "non-alcoholic beverages": 14,
55
+ "nuts, nut products and seeds": 15,
56
+ "other food product / mixed": 16,
57
+ "pet feed": 17,
58
+ "prepared dishes and snacks": 18,
59
+ "seafood": 19,
60
+ "soups, broths, sauces and condiments": 20,
61
+ "sugars and syrups": 21
62
+ },
63
+ "layer_norm_eps": 1e-05,
64
+ "max_position_embeddings": 514,
65
+ "model_type": "roberta",
66
+ "num_attention_heads": 16,
67
+ "num_hidden_layers": 24,
68
+ "pad_token_id": 1,
69
+ "position_embedding_type": "absolute",
70
+ "torch_dtype": "float32",
71
+ "transformers_version": "4.44.2",
72
+ "type_vocab_size": 1,
73
+ "use_cache": true,
74
+ "vocab_size": 50265
75
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af183d720fcf367c4fcd110c197c2f77241c5fb31730a11b88afb55e4cffdc87
3
+ size 1421577416
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff