cloudyu commited on
Commit
4e6b524
1 Parent(s): ce15fd9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -25
README.md CHANGED
@@ -5,28 +5,3 @@
5
  * Metrics improved by DPO
6
  ![Metrsc improment](dpo-metrics.jpg)
7
 
8
- gpu code example
9
-
10
- ```
11
- import torch
12
- from transformers import AutoTokenizer, AutoModelForCausalLM
13
- import math
14
-
15
- ## v2 models
16
- model_path = "cloudyu/Pluto_24B_DPO_200"
17
-
18
- tokenizer = AutoTokenizer.from_pretrained(model_path, use_default_system_prompt=False)
19
- model = AutoModelForCausalLM.from_pretrained(
20
- model_path, torch_dtype=torch.bfloat16, device_map='auto',local_files_only=False, load_in_4bit=True
21
- )
22
- print(model)
23
- prompt = input("please input prompt:")
24
- while len(prompt) > 0:
25
- input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")
26
-
27
- generation_output = model.generate(
28
- input_ids=input_ids, max_new_tokens=500,repetition_penalty=1.2
29
- )
30
- print(tokenizer.decode(generation_output[0]))
31
- prompt = input("please input prompt:")
32
- ```
 
5
  * Metrics improved by DPO
6
  ![Metrsc improment](dpo-metrics.jpg)
7