eunJ commited on
Commit
1ddd624
·
verified ·
1 Parent(s): 1452df5

Initial commit: upload all files in current directory

Browse files
Files changed (4) hide show
  1. config.json +4 -25
  2. model.safetensors +2 -2
  3. tokenizer_config.json +1 -0
  4. upload.ipynb +26 -5
config.json CHANGED
@@ -1,40 +1,19 @@
1
  {
2
- "_name_or_path": "microsoft/codebert-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
  "id2label": {
14
  "0": "LABEL_0",
15
  "1": "LABEL_1",
16
  "2": "LABEL_2",
17
  "3": "LABEL_3"
18
  },
19
- "initializer_range": 0.02,
20
- "intermediate_size": 3072,
21
  "label2id": {
22
  "LABEL_0": 0,
23
  "LABEL_1": 1,
24
  "LABEL_2": 2,
25
  "LABEL_3": 3
26
- },
27
- "layer_norm_eps": 1e-05,
28
- "max_position_embeddings": 514,
29
- "model_type": "roberta",
30
- "num_attention_heads": 12,
31
- "num_hidden_layers": 12,
32
- "output_past": true,
33
- "pad_token_id": 1,
34
- "position_embedding_type": "absolute",
35
- "torch_dtype": "float32",
36
- "transformers_version": "4.49.0",
37
- "type_vocab_size": 1,
38
- "use_cache": true,
39
- "vocab_size": 50265
40
- }
 
1
  {
2
+ "model_type": "roberta",
3
  "architectures": [
4
  "RobertaForSequenceClassification"
5
  ],
6
+ "num_labels": 4,
 
 
 
 
 
 
7
  "id2label": {
8
  "0": "LABEL_0",
9
  "1": "LABEL_1",
10
  "2": "LABEL_2",
11
  "3": "LABEL_3"
12
  },
 
 
13
  "label2id": {
14
  "LABEL_0": 0,
15
  "LABEL_1": 1,
16
  "LABEL_2": 2,
17
  "LABEL_3": 3
18
+ }
19
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c601158bf8733adb819d956d6e3c418480f72fa7216b30463b1f5aa291ce2756
3
- size 498618976
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8037175a0f7980967910a796119cf0250a6c0200f7568225f2e9aaeb43b9b68
3
+ size 498633008
tokenizer_config.json CHANGED
@@ -45,6 +45,7 @@
45
  "bos_token": "<s>",
46
  "clean_up_tokenization_spaces": false,
47
  "cls_token": "<s>",
 
48
  "eos_token": "</s>",
49
  "errors": "replace",
50
  "extra_special_tokens": {},
 
45
  "bos_token": "<s>",
46
  "clean_up_tokenization_spaces": false,
47
  "cls_token": "<s>",
48
+ "do_lower_case": false,
49
  "eos_token": "</s>",
50
  "errors": "replace",
51
  "extra_special_tokens": {},
upload.ipynb CHANGED
@@ -2,9 +2,21 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": null,
6
  "metadata": {},
7
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
8
  "source": [
9
  "repo_id = \"eunJ/codebert_vulnerability_detector_multi\" # 바꿔주세요\n",
10
  "create_repo(repo_id, repo_type=\"model\", exist_ok=True)\n"
@@ -12,9 +24,18 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": null,
16
  "metadata": {},
17
- "outputs": [],
 
 
 
 
 
 
 
 
 
18
  "source": [
19
  "\n",
20
  "from huggingface_hub import create_repo, upload_folder\n",
@@ -61,7 +82,7 @@
61
  ],
62
  "metadata": {
63
  "kernelspec": {
64
- "display_name": "LLMPSM",
65
  "language": "python",
66
  "name": "python3"
67
  },
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "ename": "NameError",
10
+ "evalue": "name 'create_repo' is not defined",
11
+ "output_type": "error",
12
+ "traceback": [
13
+ "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
14
+ "\u001b[31mNameError\u001b[39m Traceback (most recent call last)",
15
+ "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m repo_id = \u001b[33m\"\u001b[39m\u001b[33meunJ/codebert_vulnerability_detector_multi\u001b[39m\u001b[33m\"\u001b[39m \u001b[38;5;66;03m# 바꿔주세요\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[43mcreate_repo\u001b[49m(repo_id, repo_type=\u001b[33m\"\u001b[39m\u001b[33mmodel\u001b[39m\u001b[33m\"\u001b[39m, exist_ok=\u001b[38;5;28;01mTrue\u001b[39;00m)\n",
16
+ "\u001b[31mNameError\u001b[39m: name 'create_repo' is not defined"
17
+ ]
18
+ }
19
+ ],
20
  "source": [
21
  "repo_id = \"eunJ/codebert_vulnerability_detector_multi\" # 바꿔주세요\n",
22
  "create_repo(repo_id, repo_type=\"model\", exist_ok=True)\n"
 
24
  },
25
  {
26
  "cell_type": "code",
27
+ "execution_count": 2,
28
  "metadata": {},
29
+ "outputs": [
30
+ {
31
+ "name": "stderr",
32
+ "output_type": "stream",
33
+ "text": [
34
+ "/data/eun/anaconda3/envs/xcodevul/lib/python3.13/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
35
+ " from .autonotebook import tqdm as notebook_tqdm\n"
36
+ ]
37
+ }
38
+ ],
39
  "source": [
40
  "\n",
41
  "from huggingface_hub import create_repo, upload_folder\n",
 
82
  ],
83
  "metadata": {
84
  "kernelspec": {
85
+ "display_name": "xcodevul",
86
  "language": "python",
87
  "name": "python3"
88
  },