Apel-sin commited on
Commit
3afbb6d
·
1 Parent(s): bf07192

add measurement.json

Browse files
Files changed (2) hide show
  1. README.md +95 -0
  2. measurement.json +0 -0
README.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - code
5
+ pipeline_tag: text-generation
6
+ ---
7
+
8
+ <a href="https://ntq.com.vn" target="_blank"><img src="https://cdn-uploads.huggingface.co/production/uploads/5ee1b417636bdb3834e2da19/etbfTJuVdAub2evNP_E4g.png" width="200"/></a>
9
+
10
+ ## Introduction
11
+
12
+ Nxcode-CQ-7B-orpo is an [Monolithic Preference Optimization without Reference Model](https://arxiv.org/abs/2403.07691) fine-tune of Qwen/CodeQwen1.5-7B on 100k samples of high-quality ranking data.
13
+
14
+ ## [Evalplus](https://github.com/evalplus/evalplus)
15
+
16
+ | EvalPlus | pass@1 |
17
+ | --- | --- |
18
+ | HumanEval | 86.6 |
19
+ | HumanEval+ | 83.5 |
20
+ | MBPP(v0.2.0) | 82.3 |
21
+ | MBPP+(v0.2.0) | 70.4 |
22
+
23
+ We use a simple template to generate the solution for evalplus:
24
+
25
+ ```python
26
+ "Complete the following Python function:\n{prompt}"
27
+ ```
28
+
29
+ [Evalplus Leaderboard](https://evalplus.github.io/leaderboard.html)
30
+ | Models | HumanEval | HumanEval+|
31
+ |------ | ------ | ------ |
32
+ | GPT-4-Turbo (April 2024)| 90.2| 86.6|
33
+ | GPT-4 (May 2023)| 88.4| 81.17|
34
+ | GPT-4-Turbo (Nov 2023)| 85.4| 79.3|
35
+ | CodeQwen1.5-7B-Chat| 83.5| 78.7|
36
+ | claude-3-opus (Mar 2024)| 82.9| 76.8|
37
+ | DeepSeek-Coder-33B-instruct| 81.1| 75.0|
38
+ | WizardCoder-33B-V1.1| 79.9| 73.2|
39
+ | OpenCodeInterpreter-DS-33B| 79.3| 73.8|
40
+ | speechless-codellama-34B-v2.0| 77.4| 72|
41
+ | GPT-3.5-Turbo (Nov 2023)| 76.8| 70.7|
42
+ | Llama3-70B-instruct| 76.2| 70.7|
43
+
44
+ ## Bigcode Leaderboard
45
+
46
+ [Bigcode Leaderboard](https://huggingface.co/spaces/bigcode/bigcode-models-leaderboard)
47
+
48
+ **09/05/2024**
49
+
50
+ Top 1 average score.
51
+
52
+ Top 2 winrate.
53
+
54
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5ee1b417636bdb3834e2da19/OQonD6a7aNjnN9SsTkFp-.png)
55
+
56
+
57
+ ## Quickstart
58
+
59
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. You should upgrade the transformers if you receive an error when loading the tokenizer
60
+ ```python
61
+ from transformers import AutoModelForCausalLM, AutoTokenizer
62
+ device = "cuda" # the device to load the model onto
63
+
64
+ model = AutoModelForCausalLM.from_pretrained(
65
+ "NTQAI/Nxcode-CQ-7B-orpo",
66
+ torch_dtype="auto",
67
+ device_map="auto"
68
+ )
69
+ tokenizer = AutoTokenizer.from_pretrained("NTQAI/Nxcode-CQ-7B-orpo")
70
+
71
+ prompt = """Complete the following Python function:
72
+ from typing import List
73
+
74
+
75
+ def has_close_elements(numbers: List[float], threshold: float) -> bool:
76
+ """ Check if in given list of numbers, are any two numbers closer to each other than
77
+ given threshold.
78
+ >>> has_close_elements([1.0, 2.0, 3.0], 0.5)
79
+ False
80
+ >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)
81
+ True
82
+ """
83
+ """
84
+ messages = [
85
+ {"role": "user", "content": prompt}
86
+ ]
87
+
88
+ inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
89
+ outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
90
+ res = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
91
+
92
+ ```
93
+
94
+ ### Contact information
95
+ For personal communication related to this project, please contact Nha Nguyen Van ([email protected]).
measurement.json ADDED
The diff for this file is too large to render. See raw diff