Upload 4 files
Browse files- README.md +33 -0
- config.json +83 -0
- model.safetensors +3 -0
- 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/deberta-v3-large-1280-product
|
10 |
+
library_name: transformers
|
11 |
+
pipeline_tag: text-classification
|
12 |
---
|
13 |
+
# Quintu/deberta-v3-large-1280-product
|
14 |
+
|
15 |
+
Mô hình `Quintu/deberta-v3-large-1280-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/deberta-v3-large-1280-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,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/deberta-v3-large",
|
3 |
+
"architectures": [
|
4 |
+
"DebertaV2ForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"id2label": {
|
11 |
+
"0": "alcoholic beverages",
|
12 |
+
"1": "cereals and bakery products",
|
13 |
+
"2": "cocoa and cocoa preparations, coffee and tea",
|
14 |
+
"3": "confectionery",
|
15 |
+
"4": "dietetic foods, food supplements, fortified foods",
|
16 |
+
"5": "fats and oils",
|
17 |
+
"6": "feed materials",
|
18 |
+
"7": "food additives and flavourings",
|
19 |
+
"8": "food contact materials",
|
20 |
+
"9": "fruits and vegetables",
|
21 |
+
"10": "herbs and spices",
|
22 |
+
"11": "honey and royal jelly",
|
23 |
+
"12": "ices and desserts",
|
24 |
+
"13": "meat, egg and dairy products",
|
25 |
+
"14": "non-alcoholic beverages",
|
26 |
+
"15": "nuts, nut products and seeds",
|
27 |
+
"16": "other food product / mixed",
|
28 |
+
"17": "pet feed",
|
29 |
+
"18": "prepared dishes and snacks",
|
30 |
+
"19": "seafood",
|
31 |
+
"20": "soups, broths, sauces and condiments",
|
32 |
+
"21": "sugars and syrups"
|
33 |
+
},
|
34 |
+
"initializer_range": 0.02,
|
35 |
+
"intermediate_size": 4096,
|
36 |
+
"label2id": {
|
37 |
+
"alcoholic beverages": 0,
|
38 |
+
"cereals and bakery products": 1,
|
39 |
+
"cocoa and cocoa preparations, coffee and tea": 2,
|
40 |
+
"confectionery": 3,
|
41 |
+
"dietetic foods, food supplements, fortified foods": 4,
|
42 |
+
"fats and oils": 5,
|
43 |
+
"feed materials": 6,
|
44 |
+
"food additives and flavourings": 7,
|
45 |
+
"food contact materials": 8,
|
46 |
+
"fruits and vegetables": 9,
|
47 |
+
"herbs and spices": 10,
|
48 |
+
"honey and royal jelly": 11,
|
49 |
+
"ices and desserts": 12,
|
50 |
+
"meat, egg and dairy products": 13,
|
51 |
+
"non-alcoholic beverages": 14,
|
52 |
+
"nuts, nut products and seeds": 15,
|
53 |
+
"other food product / mixed": 16,
|
54 |
+
"pet feed": 17,
|
55 |
+
"prepared dishes and snacks": 18,
|
56 |
+
"seafood": 19,
|
57 |
+
"soups, broths, sauces and condiments": 20,
|
58 |
+
"sugars and syrups": 21
|
59 |
+
},
|
60 |
+
"layer_norm_eps": 1e-07,
|
61 |
+
"max_position_embeddings": 512,
|
62 |
+
"max_relative_positions": -1,
|
63 |
+
"model_type": "deberta-v2",
|
64 |
+
"norm_rel_ebd": "layer_norm",
|
65 |
+
"num_attention_heads": 16,
|
66 |
+
"num_hidden_layers": 24,
|
67 |
+
"pad_token_id": 0,
|
68 |
+
"pooler_dropout": 0,
|
69 |
+
"pooler_hidden_act": "gelu",
|
70 |
+
"pooler_hidden_size": 1024,
|
71 |
+
"pos_att_type": [
|
72 |
+
"p2c",
|
73 |
+
"c2p"
|
74 |
+
],
|
75 |
+
"position_biased_input": false,
|
76 |
+
"position_buckets": 256,
|
77 |
+
"relative_attention": true,
|
78 |
+
"share_att_key": true,
|
79 |
+
"torch_dtype": "float32",
|
80 |
+
"transformers_version": "4.44.2",
|
81 |
+
"type_vocab_size": 0,
|
82 |
+
"vocab_size": 128100
|
83 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:07aaa13fe76770c8715d36d8d9b6543b889dafb8cd3e84f5f81d3ec9f80ab0bb
|
3 |
+
size 1740386448
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|