aaabiao commited on
Commit
5be9e8c
1 Parent(s): e291589

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md CHANGED
@@ -1,3 +1,65 @@
1
  ---
 
 
 
 
 
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - code
7
  license: apache-2.0
8
  ---
9
+
10
+ <h1 align="center"> OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement<h1>
11
+
12
+ <p align="center">
13
+ <img width="1000px" alt="OpenCodeInterpreter" src="https://opencodeinterpreter.github.io/static/images/figure1.png">
14
+ </p>
15
+ <p align="center">
16
+ <a href="https://opencodeinterpreter.github.io/">[🏠Homepage]</a>
17
+ |
18
+ <a href="https://github.com/OpenCodeInterpreter/OpenCodeInterpreter/">[🛠️Code]</a>
19
+ </p>
20
+ <hr>
21
+
22
+ ## Introduction
23
+ OpenCodeInterpreter is a family of open-source code generation systems designed to bridge the gap between large language models and advanced proprietary systems like the GPT-4 Code Interpreter. It significantly advances code generation capabilities by integrating execution and iterative refinement functionalities.
24
+
25
+ For further information and related work, refer to our paper: ["OpenCodeInterpreter: A System for Enhanced Code Generation and Execution"](https://arxiv.org/abs/2402.14658) available on arXiv.
26
+
27
+ ## Model Information
28
+ This model is based on [deepseek-coder-6.7b-base](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-base).
29
+
30
+ ## Model Usage
31
+ ### Inference
32
+
33
+ ```python
34
+ import torch
35
+ from transformers import AutoTokenizer, AutoModelForCausalLM
36
+ model_path="m-a-p/OpenCodeInterpreter-DS-1.3B"
37
+
38
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
39
+ model = AutoModelForCausalLM.from_pretrained(
40
+ model_path,
41
+ torch_dtype=torch.bfloat16,
42
+ device_map="auto",
43
+ )
44
+ model.eval()
45
+
46
+ prompt = "Write a function to find the shared elements from the given two lists."
47
+ inputs = tokenizer.apply_chat_template(
48
+ [{'role': 'user', 'content': prompt }],
49
+ return_tensors="pt"
50
+ ).to(model.device)
51
+ outputs = model.generate(
52
+ inputs,
53
+ max_new_tokens=1024,
54
+ do_sample=False,
55
+ pad_token_id=tokenizer.eos_token_id,
56
+ eos_token_id=tokenizer.eos_token_id,
57
+ )
58
+ print(tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))
59
+ ```
60
+
61
+
62
+ ## Contact
63
+
64
+ If you have any inquiries, please feel free to raise an issue or reach out to us via email at: xiangyue.work@gmail.com, zhengtianyu0428@gmail.com.
65
+ We're here to assist you!"