legolasyiu commited on
Commit
3a29eab
1 Parent(s): e05f96f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -26
README.md CHANGED
@@ -18,32 +18,6 @@ finetuinng with
18
 
19
 
20
  # code
21
-
22
- ```python
23
- from unsloth import FastLanguageModel
24
-
25
- model, tokenizer = FastLanguageModel.from_pretrained(
26
- model_name = "EpistemeAI/EpistemeAI-codegemma-2-9b", # YOUR MODEL YOU USED FOR TRAINING
27
- max_seq_length = max_seq_length,
28
- dtype = dtype,
29
- load_in_4bit = load_in_4bit,
30
- )
31
- FastLanguageModel.for_inference(model) # Enable native 2x faster inference
32
-
33
- # alpaca_prompt = You MUST copy from above!
34
-
35
- inputs = tokenizer(
36
- [
37
- alpaca_prompt.format(
38
- "Create a function to calculate the sum of a sequence of integers.", # instruction
39
- "", # input
40
- "", # output - leave this blank for generation!
41
- )
42
- ], return_tensors = "pt").to("cuda")
43
-
44
- outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
45
- tokenizer.batch_decode(outputs)
46
-
47
  ```
48
 
49
  Formated text
@@ -71,6 +45,33 @@ Formated text
71
 
72
  ''
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  # Uploaded model
75
 
76
  - **Developed by:** EpistemeAI
 
18
 
19
 
20
  # code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ```
22
 
23
  Formated text
 
45
 
46
  ''
47
 
48
+
49
+ ```python
50
+ from unsloth import FastLanguageModel
51
+
52
+ model, tokenizer = FastLanguageModel.from_pretrained(
53
+ model_name = "EpistemeAI/EpistemeAI-codegemma-2-9b", # YOUR MODEL YOU USED FOR TRAINING
54
+ max_seq_length = max_seq_length,
55
+ dtype = dtype,
56
+ load_in_4bit = load_in_4bit,
57
+ )
58
+ FastLanguageModel.for_inference(model) # Enable native 2x faster inference
59
+
60
+ # alpaca_prompt = You MUST copy from above!
61
+
62
+ inputs = tokenizer(
63
+ [
64
+ alpaca_prompt.format(
65
+ "Create a function to calculate the sum of a sequence of integers.", # instruction
66
+ "", # input
67
+ "", # output - leave this blank for generation!
68
+ )
69
+ ], return_tensors = "pt").to("cuda")
70
+
71
+ outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
72
+ tokenizer.batch_decode(outputs)
73
+
74
+
75
  # Uploaded model
76
 
77
  - **Developed by:** EpistemeAI