chencyudel commited on
Commit
d1bf200
1 Parent(s): f0f58cc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -10
README.md CHANGED
@@ -32,9 +32,9 @@ CodeFuse-DeepSeek-33B is a 33B Code-LLM finetuned by QLoRA on multiple code-rela
32
 
33
  🔥🔥 2023-09-27 CodeFuse-StarCoder-15B has been released, achieving a pass@1 (greedy decoding) score of 54.9% on HumanEval, which is a 21% increase compared to StarCoder's 33.6%.
34
 
35
- 🔥🔥 2023-09-26 We are pleased to announce the release of the [4-bit quantized version](https://modelscope.cn/models/codefuse-ai/CodeFuse-CodeLlama-34B-4bits/summary) of [CodeFuse-CodeLlama-34B](https://modelscope.cn/models/codefuse-ai/CodeFuse-CodeLlama-34B/summary). Despite the quantization process, the model still achieves a remarkable 73.8% accuracy (greedy decoding) on the HumanEval pass@1 metric.
36
 
37
- 🔥🔥 2023-09-11 [CodeFuse-CodeLlama34B](https://modelscope.cn/models/codefuse-ai/CodeFuse-CodeLlama-34B/summary) has achieved 74.4% of pass@1 (greedy decoding) on HumanEval, which is SOTA results for openspurced LLMs at present.
38
 
39
  <br>
40
 
@@ -44,7 +44,6 @@ CodeFuse-DeepSeek-33B is a 33B Code-LLM finetuned by QLoRA on multiple code-rela
44
 
45
  + If you wish to fine-tune the model yourself, you can visit ✨[MFTCoder](https://github.com/codefuse-ai/MFTCoder)✨✨
46
 
47
- + If you wish to deploy the model yourself, you can visit ✨[FasterTransformer4CodeFuse](https://github.com/codefuse-ai/FasterTransformer4CodeFuse)✨✨
48
 
49
  + If you wish to see a demo of the model, you can visit ✨[CodeFuse Demo](https://github.com/codefuse-ai/codefuse)✨✨
50
 
@@ -156,16 +155,18 @@ Specifically, we also add the Programming Language Tag (e.g. "```# language: Pyt
156
  ```python
157
  import torch
158
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
159
-
 
 
160
  def load_model_tokenizer(model_path):
161
- tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/CodeFuse-DeepSeek-33B", trust_remote_code=True)
162
  tokenizer.eos_token = "<|end▁of▁sentence|>"
163
  tokenizer.pad_token = "<|end▁of▁sentence|>"
164
  tokenizer.eos_token_id = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)
165
  tokenizer.pad_token_id = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)
166
  tokenizer.padding_side = "left"
167
 
168
- model = AutoModelForCausalLM.from_pretrained('codefuse-ai/CodeFuse-DeepSeek-33B', device_map='auto',torch_dtype=torch.bfloat16, trust_remote_code=True)
169
  return model, tokenizer
170
 
171
 
@@ -341,19 +342,20 @@ def separate_paren_groups(paren_string: str) -> List[str]:
341
  ```python
342
  import torch
343
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
344
-
 
 
345
  def load_model_tokenizer(model_path):
346
- tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/CodeFuse-DeepSeek-33B", trust_remote_code=True, use_fast=False, legacy=False)
347
  tokenizer.eos_token = "<|end▁of▁sentence|>"
348
  tokenizer.pad_token = "<|end▁of▁sentence|>"
349
  tokenizer.eos_token_id = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)
350
  tokenizer.pad_token_id = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)
351
  tokenizer.padding_side = "left"
352
 
353
- model = AutoModelForCausalLM.from_pretrained('codefuse-ai/CodeFuse-DeepSeek-33B', device_map='auto',torch_dtype=torch.bfloat16, trust_remote_code=True)
354
  return model, tokenizer
355
 
356
-
357
  HUMAN_ROLE_START_TAG = "<s>human\n"
358
  BOT_ROLE_START_TAG = "<s>bot\n"
359
 
 
32
 
33
  🔥🔥 2023-09-27 CodeFuse-StarCoder-15B has been released, achieving a pass@1 (greedy decoding) score of 54.9% on HumanEval, which is a 21% increase compared to StarCoder's 33.6%.
34
 
35
+ 🔥🔥 2023-09-26 We are pleased to announce the release of the 4-bit quantized version of CodeFuse-CodeLlama-34B. Despite the quantization process, the model still achieves a remarkable 73.8% accuracy (greedy decoding) on the HumanEval pass@1 metric.
36
 
37
+ 🔥🔥 2023-09-11 CodeFuse-CodeLlama-34B has achieved 74.4% of pass@1 (greedy decoding) on HumanEval, which is SOTA results for openspurced LLMs at present.
38
 
39
  <br>
40
 
 
44
 
45
  + If you wish to fine-tune the model yourself, you can visit ✨[MFTCoder](https://github.com/codefuse-ai/MFTCoder)✨✨
46
 
 
47
 
48
  + If you wish to see a demo of the model, you can visit ✨[CodeFuse Demo](https://github.com/codefuse-ai/codefuse)✨✨
49
 
 
155
  ```python
156
  import torch
157
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
158
+
159
+ model_dir = "codefuse-ai/CodeFuse-DeepSeek-33B"
160
+
161
  def load_model_tokenizer(model_path):
162
+ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
163
  tokenizer.eos_token = "<|end▁of▁sentence|>"
164
  tokenizer.pad_token = "<|end▁of▁sentence|>"
165
  tokenizer.eos_token_id = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)
166
  tokenizer.pad_token_id = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)
167
  tokenizer.padding_side = "left"
168
 
169
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map='auto',torch_dtype=torch.bfloat16, trust_remote_code=True)
170
  return model, tokenizer
171
 
172
 
 
342
  ```python
343
  import torch
344
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
345
+
346
+ model_dir = "codefuse-ai/CodeFuse-DeepSeek-33B"
347
+
348
  def load_model_tokenizer(model_path):
349
+ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
350
  tokenizer.eos_token = "<|end▁of▁sentence|>"
351
  tokenizer.pad_token = "<|end▁of▁sentence|>"
352
  tokenizer.eos_token_id = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)
353
  tokenizer.pad_token_id = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)
354
  tokenizer.padding_side = "left"
355
 
356
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map='auto',torch_dtype=torch.bfloat16, trust_remote_code=True)
357
  return model, tokenizer
358
 
 
359
  HUMAN_ROLE_START_TAG = "<s>human\n"
360
  BOT_ROLE_START_TAG = "<s>bot\n"
361