Update README.md
Browse files
README.md
CHANGED
|
@@ -3,5 +3,28 @@ datasets:
|
|
| 3 |
- code-search-net/code_search_net
|
| 4 |
base_model:
|
| 5 |
- openai-community/gpt2
|
| 6 |
-
pipeline_tag: token-classification, text-generation, code-generation
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
- code-search-net/code_search_net
|
| 4 |
base_model:
|
| 5 |
- openai-community/gpt2
|
| 6 |
+
pipeline_tag: token-classification, text-generation, code-generation.
|
| 7 |
+
library_name: transformers
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## Detailed Model Description
|
| 13 |
+
|
| 14 |
+
A GPT-2-based tokenizer further trained on 400 k+ Python functions. It keeps the original BPE backbone, adds robust encoding for indentation, common keywords, operators and camel-case variables, and is ready for any code-generation or code-understanding pipeline.
|
| 15 |
+
|
| 16 |
+
## Usage Examples:
|
| 17 |
+
|
| 18 |
+
example = """class LinearLayer():
|
| 19 |
+
def __init__(self, input_size, output_size):
|
| 20 |
+
self.weight = torch.randn(input_size, output_size)
|
| 21 |
+
self.bias = torch.zeros(output_size)
|
| 22 |
+
|
| 23 |
+
def __call__(self, x):
|
| 24 |
+
return x @ self.weights + self.bias
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
Performance:
|
| 28 |
+
['class', 'ĠLinear', 'Layer', '():', 'ĊĠĠĠ', 'Ġdef', 'Ġ__', 'init', '__(', 'self', ',', 'Ġinput', '_', 'size', ',', 'Ġoutput', '_', 'size', '):', 'ĊĠĠĠĠĠĠĠ', 'Ġself', '.', 'weight', 'Ġ=', 'Ġtorch', '.', 'randn', '(', 'input', '_', 'size', ',', 'Ġoutput', '_', 'size', ')', 'ĊĠĠĠĠĠĠ', 'Ġself', '.', 'bias', 'Ġ=', 'Ġtorch', '.', 'zeros', '(', 'output', '_', 'size', ')', 'ĊĊĠĠ', 'Ġdef', 'Ġ__', 'call', '__(', 'self', ',', 'Ġx', '):', 'ĊĠĠĠĠĠĠ', 'Ġreturn', 'Ġx', 'Ġ@', 'Ġself', '.', 'weights', 'Ġ+', 'Ġself', '.', 'bias', 'ĊĠĠĠĠ']
|
| 29 |
+
|
| 30 |
+
|