legolasyiu commited on
Commit
8e98822
1 Parent(s): 63142c8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -11,7 +11,7 @@ tags:
11
  - trl
12
  ---
13
 
14
- # Athena-gemma-2-2b-lt for coding
15
 
16
  Supervised fine tuned (sft unsloth) for coding with EpistemeAI coding dataset.
17
 
@@ -49,7 +49,7 @@ import torch
49
  from transformers import pipeline
50
  pipe = pipeline(
51
  "text-generation",
52
- model="EpistemeAI/Athena-gemma-2-2b-it",
53
  model_kwargs={"torch_dtype": torch.bfloat16},
54
  device="cuda", # replace with "mps" to run on a Mac device
55
  )
@@ -70,7 +70,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
70
  import torch
71
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
72
  model = AutoModelForCausalLM.from_pretrained(
73
- "EpistemeAI/Athena-gemma-2-2b-it",
74
  device_map="auto",
75
  torch_dtype=torch.bfloat16,
76
  )
@@ -104,7 +104,7 @@ You can also use `float32` if you skip the dtype, but no precision increase will
104
  from transformers import AutoTokenizer, AutoModelForCausalLM
105
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
106
  model = AutoModelForCausalLM.from_pretrained(
107
- "EpistemeAI/Athena-gemma-2-2b-it",
108
  device_map="auto",
109
  )
110
  input_text = "Write me a poem about Machine Learning."
@@ -135,7 +135,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
135
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
136
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
137
  model = AutoModelForCausalLM.from_pretrained(
138
- "EpistemeAI/Athena-gemma-2-2b-it",
139
  quantization_config=quantization_config,
140
  )
141
  input_text = "Write me a poem about Machine Learning."
@@ -155,7 +155,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
155
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)
156
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
157
  model = AutoModelForCausalLM.from_pretrained(
158
- "EpistemeAI/Athena-gemma-2-2b-it",
159
  quantization_config=quantization_config,
160
  )
161
  input_text = "Write me a poem about Machine Learning."
@@ -185,7 +185,7 @@ import torch
185
  torch.set_float32_matmul_precision("high")
186
  # load the model + tokenizer
187
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
188
- model = Gemma2ForCausalLM.from_pretrained("EpistemeAI/Athena-gemma-2-2b-it", torch_dtype=torch.bfloat16)
189
  model.to("cuda")
190
  # apply the torch compile transformation
191
  model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=True)
 
11
  - trl
12
  ---
13
 
14
+ # Athena-codegemma-2-2b-lt for coding
15
 
16
  Supervised fine tuned (sft unsloth) for coding with EpistemeAI coding dataset.
17
 
 
49
  from transformers import pipeline
50
  pipe = pipeline(
51
  "text-generation",
52
+ model="EpistemeAI/Athena-codegemma-2-2b-it",
53
  model_kwargs={"torch_dtype": torch.bfloat16},
54
  device="cuda", # replace with "mps" to run on a Mac device
55
  )
 
70
  import torch
71
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
72
  model = AutoModelForCausalLM.from_pretrained(
73
+ "EpistemeAI/Athena-codegemma-2-2b-it",
74
  device_map="auto",
75
  torch_dtype=torch.bfloat16,
76
  )
 
104
  from transformers import AutoTokenizer, AutoModelForCausalLM
105
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
106
  model = AutoModelForCausalLM.from_pretrained(
107
+ "EpistemeAI/Athena-codegemma-2-2b-it",
108
  device_map="auto",
109
  )
110
  input_text = "Write me a poem about Machine Learning."
 
135
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
136
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
137
  model = AutoModelForCausalLM.from_pretrained(
138
+ "EpistemeAI/Athena-codegemma-2-2b-it",
139
  quantization_config=quantization_config,
140
  )
141
  input_text = "Write me a poem about Machine Learning."
 
155
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)
156
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
157
  model = AutoModelForCausalLM.from_pretrained(
158
+ "EpistemeAI/Athena-codegemma-2-2b-it",
159
  quantization_config=quantization_config,
160
  )
161
  input_text = "Write me a poem about Machine Learning."
 
185
  torch.set_float32_matmul_precision("high")
186
  # load the model + tokenizer
187
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
188
+ model = Gemma2ForCausalLM.from_pretrained("EpistemeAI/Athena-codegemma-2-2b-it", torch_dtype=torch.bfloat16)
189
  model.to("cuda")
190
  # apply the torch compile transformation
191
  model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=True)