Instructions to use karths/binary_classification_train_code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use karths/binary_classification_train_code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="karths/binary_classification_train_code")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("karths/binary_classification_train_code") model = AutoModelForSequenceClassification.from_pretrained("karths/binary_classification_train_code") - Notebooks
- Google Colab
- Kaggle
Add ONNX export for CPU inference (no GPU required)
Browse files- model.onnx +2 -2
- tokenizer.json +2 -2
- tokenizer_config.json +24 -24
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca15ab86929dd3ca03b625e142a8554531f390778bc2ed678fae182661fbf101
|
| 3 |
+
size 331055014
|
tokenizer.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
-
"Fixed":
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 128,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
+
"Fixed": 128
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
tokenizer_config.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_prefix_space": false,
|
| 3 |
-
"backend": "tokenizers",
|
| 4 |
-
"bos_token": "<s>",
|
| 5 |
-
"clean_up_tokenization_spaces": false,
|
| 6 |
-
"cls_token": "<s>",
|
| 7 |
-
"eos_token": "</s>",
|
| 8 |
-
"errors": "replace",
|
| 9 |
-
"is_local": false,
|
| 10 |
-
"mask_token": "<mask>",
|
| 11 |
-
"max_length": 512,
|
| 12 |
-
"model_max_length": 512,
|
| 13 |
-
"pad_to_multiple_of": null,
|
| 14 |
-
"pad_token": "<pad>",
|
| 15 |
-
"pad_token_type_id": 0,
|
| 16 |
-
"padding_side": "right",
|
| 17 |
-
"sep_token": "</s>",
|
| 18 |
-
"stride": 0,
|
| 19 |
-
"tokenizer_class": "RobertaTokenizer",
|
| 20 |
-
"trim_offsets": true,
|
| 21 |
-
"truncation_side": "right",
|
| 22 |
-
"truncation_strategy": "longest_first",
|
| 23 |
-
"unk_token": "<unk>"
|
| 24 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"cls_token": "<s>",
|
| 7 |
+
"eos_token": "</s>",
|
| 8 |
+
"errors": "replace",
|
| 9 |
+
"is_local": false,
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"max_length": 512,
|
| 12 |
+
"model_max_length": 512,
|
| 13 |
+
"pad_to_multiple_of": null,
|
| 14 |
+
"pad_token": "<pad>",
|
| 15 |
+
"pad_token_type_id": 0,
|
| 16 |
+
"padding_side": "right",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"stride": 0,
|
| 19 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 20 |
+
"trim_offsets": true,
|
| 21 |
+
"truncation_side": "right",
|
| 22 |
+
"truncation_strategy": "longest_first",
|
| 23 |
+
"unk_token": "<unk>"
|
| 24 |
+
}
|