arise-sustech commited on
Commit
68a4758
1 Parent(s): 272c2ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -72,7 +72,7 @@ Then use LLM4Decompile to translate the assembly instructions into C:
72
  from transformers import AutoTokenizer, AutoModelForCausalLM
73
  import torch
74
 
75
- model_path = 'arise-sustech/llm4decompile-1.3b'
76
  tokenizer = AutoTokenizer.from_pretrained(model_path)
77
  model = AutoModelForCausalLM.from_pretrained(model_path,torch_dtype=torch.bfloat16).cuda()
78
 
@@ -80,7 +80,7 @@ with open(fileName +'_' + opt_state +'.asm','r') as f:#original file
80
  asm_func = f.read()
81
  inputs = tokenizer(asm_func, return_tensors="pt").to(model.device)
82
  with torch.no_grad():
83
- outputs = model.generate(**inputs, max_new_tokens=500)
84
  c_func_decompile = tokenizer.decode(outputs[0][len(inputs[0]):-1])
85
  ```
86
 
 
72
  from transformers import AutoTokenizer, AutoModelForCausalLM
73
  import torch
74
 
75
+ model_path = 'arise-sustech/llm4decompile-6.7b-uo'
76
  tokenizer = AutoTokenizer.from_pretrained(model_path)
77
  model = AutoModelForCausalLM.from_pretrained(model_path,torch_dtype=torch.bfloat16).cuda()
78
 
 
80
  asm_func = f.read()
81
  inputs = tokenizer(asm_func, return_tensors="pt").to(model.device)
82
  with torch.no_grad():
83
+ outputs = model.generate(**inputs, max_new_tokens=512)
84
  c_func_decompile = tokenizer.decode(outputs[0][len(inputs[0]):-1])
85
  ```
86