pecan-anon commited on
Commit
b7cd106
·
verified ·
1 Parent(s): 19c75b1

Model card: label casing, exact base model

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -17,7 +17,7 @@ tags:
17
 
18
  `microsoft/unixcoder-base` fine-tuned on the [PECAN benchmark](https://huggingface.co/datasets/pecan-anon/pecan-anon) to
19
  identify the programming language of a raw code fragment of at most 512 bytes, with no file name,
20
- extension, or repository context. It predicts one of 319 languages (`config.id2label`).
21
 
22
  Artifact repository (code, scoring, all results): https://anonymous.4open.science/r/pecan-benchmark
23
 
@@ -62,7 +62,7 @@ fragment = "def add(a, b):\n return a + b\n"
62
  inputs = tok(fragment, truncation=True, max_length=512, return_tensors="pt")
63
  with torch.no_grad():
64
  logits = model(**inputs).logits
65
- print(model.config.id2label[int(logits.argmax())])
66
  ```
67
 
68
  To evaluate on the benchmark, write one prediction per test fragment and score it with
 
17
 
18
  `microsoft/unixcoder-base` fine-tuned on the [PECAN benchmark](https://huggingface.co/datasets/pecan-anon/pecan-anon) to
19
  identify the programming language of a raw code fragment of at most 512 bytes, with no file name,
20
+ extension, or repository context. It predicts one of 319 languages (`config.id2label`; lowercased, these are exactly the PECAN labels).
21
 
22
  Artifact repository (code, scoring, all results): https://anonymous.4open.science/r/pecan-benchmark
23
 
 
62
  inputs = tok(fragment, truncation=True, max_length=512, return_tensors="pt")
63
  with torch.no_grad():
64
  logits = model(**inputs).logits
65
+ print(model.config.id2label[int(logits.argmax())].lower()) # PECAN labels are lowercase
66
  ```
67
 
68
  To evaluate on the benchmark, write one prediction per test fragment and score it with