arampacha commited on
Commit
1402a13
1 Parent(s): ac11c61

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -0
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GPT-Code-Clippy-125M-APPS
2
+
3
+ ## Model Description
4
+
5
+ GPT-CC-125M-APPS is a GPT-Neo-125M finetuned on APPS dataset. This model is specialized to solve programming tasks.
6
+
7
+ ## Training data
8
+
9
+ [APPS dataset](https://github.com/hendrycks/apps).
10
+
11
+ ## Training procedure
12
+
13
+ The training script used to train this model can be found [here](https://github.com/ncoop57/gpt-code-clippy/blob/camera-ready/training/run_clm_apps.py).
14
+
15
+ ## Intended Use and Limitations
16
+
17
+ The model is finetuned to solve programming problems given a text description and optional starter code.
18
+
19
+ ### How to use
20
+
21
+ You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run:
22
+
23
+ ```py
24
+ from transformers import AutoModelForCausalLM, AutoTokenizer, FlaxAutoModelForCausalLM
25
+
26
+ model = AutoModelForCausalLM.from_pretrained("flax-community/gpt-code-clippy-125M-apps-alldata")
27
+ tokenizer = AutoTokenizer.from_pretrained("flax-community/gpt-code-clippy-125M-apps-alldata")
28
+
29
+ prompt = """
30
+ A function to greet user. Given a user name it should say hello
31
+
32
+ def greet(name):
33
+
34
+ ANSWER:
35
+ """
36
+
37
+ input_ids = tokenizer(prompt, return_tensors='pt').input_ids.to(device)
38
+ start = input_ids.size(1)
39
+ out = model.generate(input_ids, do_sample=True, max_length=50, num_beams=2,
40
+ early_stopping=True, eos_token_id=tokenizer.eos_token_id, )
41
+
42
+ print(tokenizer.decode(out[0][start:]))
43
+ ```
44
+
45
+ ### Limitations and Biases
46
+
47
+ The model is intended to be used for research purposes and comes with no guarantees of quality of generated code.
48
+ GPT-CC is finetuned GPT-Neo and might have inhereted biases and limitations from it. See [GPT-Neo model card](https://huggingface.co/EleutherAI/gpt-neo-125M#limitations-and-biases) for details.
49
+
50
+ ## Eval results
51
+
52
+ Coming soon...