TechxGenus commited on
Commit
7124e8b
1 Parent(s): af953a4

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md CHANGED
@@ -1,5 +1,45 @@
1
  ---
 
 
 
 
 
2
  license: other
3
  license_name: gemma-terms-of-use
4
  license_link: https://ai.google.dev/gemma/terms
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - code
4
+ - gemma
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
  license: other
8
  license_name: gemma-terms-of-use
9
  license_link: https://ai.google.dev/gemma/terms
10
  ---
11
+
12
+ <p align="center">
13
+ <img width="300px" alt="CodeGemma" src="https://huggingface.co/TechxGenus/CodeGemma-2b/resolve/main/CodeGemma.jpg">
14
+ </p>
15
+
16
+ ### CodeGemma
17
+
18
+ We've fine-tuned Gemma-2b with an additional 0.7 billion high-quality, code-related tokens for 3 epochs. We used DeepSpeed ZeRO 3 and Flash Attention 2 to accelerate the training process. It achieves **54.9 pass@1** on HumanEval-Python. This model operates using the Alpaca instruction format (excluding the system prompt).
19
+
20
+ ### Usage
21
+
22
+ Here give an example of how to use our model.
23
+
24
+ ```python
25
+ from transformers import pipeline
26
+ import torch
27
+ PROMPT = """### Instruction
28
+ {instruction}
29
+ ### Response
30
+ """
31
+ instruction = <Your code instruction here>
32
+ prompt = PROMPT.format(instruction=instruction)
33
+ generator = pipeline(
34
+ model="TechxGenus/CodeGemma-2b",
35
+ task="text-generation",
36
+ torch_dtype=torch.bfloat16,
37
+ device_map="auto",
38
+ )
39
+ result = generator(prompt, max_length=2048)
40
+ print(result[0]["generated_text"])
41
+ ```
42
+
43
+ ### Note
44
+
45
+ Model may sometimes make errors, produce misleading contents, or struggle to manage tasks that are not related to coding. It has undergone very limited testing. Additional safety testing should be performed before any real-world deployments.