1412312anonymous commited on
Commit
08660ef
·
verified ·
1 Parent(s): 255989f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ metrics:
5
+ - code_eval
6
+ base_model:
7
+ - deepseek-ai/deepseek-coder-6.7b-base
8
+ pipeline_tag: text-generation
9
+ library_name: transformers
10
+ tags:
11
+ - code
12
+ ---
13
+ # AssertSolver
14
+
15
+ <!-- Provide a quick summary of what the model is/does. -->
16
+
17
+
18
+ ## Model Details
19
+
20
+ ### Model Description
21
+
22
+ <!-- Provide a longer summary of what this model is. -->
23
+
24
+
25
+
26
+ - **Finetuned from model:** deepseek-ai/deepseek-coder-6.7b-base
27
+
28
+ ### Model Sources
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Paper:** Insights from Rights and Wrongs: A Large Language Model for Solving Assertion Failures in RTL Design
33
+
34
+
35
+ ## How to Get Started with the Model
36
+
37
+ Use the code below to get started with the model.
38
+
39
+ ```
40
+ from transformers import AutoTokenizer, AutoModelForCausalLM
41
+ import torch
42
+
43
+ model_name = "1412312anonymous/AssertSolver"
44
+
45
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
46
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, torch_dtype=torch.bfloat16).cuda()
47
+ prompt = "Tell me how to fix the bugs inside: `always(*) // Pretend that this * should be rst`"
48
+
49
+ messages = [{"role": "user", "content": prompt}]
50
+ inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
51
+ outputs = model.generate(
52
+ inputs,
53
+ max_new_tokens=512,
54
+ do_sample=False,
55
+ top_k=50,
56
+ top_p=0.95,
57
+ num_return_sequences=1,
58
+ eos_token_id=tokenizer.eos_token_id,
59
+ )
60
+ print(tokenizer.decode(outputs[0][len(inputs[0]) :], skip_special_tokens=True))
61
+ ```