You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Gemma Template** is a lightweight and efficient Python library for generating templates to fine-tune models and craft prompts.
24
-
Designed for flexibility, it seamlessly supports Gemma, LLaMa and other language frameworks, offering fast, user-friendly customization.
25
-
With multilingual capabilities and advanced configuration options, ensures precise, professional, and dynamic template creation.
22
+
Gemma Template is a lightweight and efficient Python library for generating templates to fine-tune models and craft prompts.
23
+
Designed for flexibility, it seamlessly supports Gemma, LLaMA, and other language frameworks, offering fast, user-friendly customization.
24
+
With multilingual capabilities and advanced configuration options, it ensures precise, professional, and dynamic template creation.
25
+
26
+
### Learning Process and Acknowledgements
27
+
As a newbie, I created Gemma Template based on what I read and learned from the following sources:
28
+
29
+
- Google Cookbook: [Advanced Prompting Techniques](https://github.com/google-gemini/gemma-cookbook/blob/main/Gemma/Advanced_Prompting_Techniques.ipynb)
30
+
- Google Cookbook: [Finetune_with_LLaMA_Factory](https://github.com/google-gemini/gemma-cookbook/blob/main/Gemma/Finetune_with_LLaMA_Factory.ipynb)
31
+
- Google Cookbook: [Finetuning Gemma for Function Calling](https://github.com/google-gemini/gemma-cookbook/blob/main/Gemma/Finetuning_Gemma_for_Function_Calling.ipynb)
- Unsloth: [Finetune Llama 3.2, Mistral, Phi-3.5, Qwen 2.5 & Gemma 2-5x faster with 80% less memory!](https://github.com/unslothai/unsloth)
34
+
35
+
36
+
Gemma Template supports exporting dataset files in three formats: `Text`, `Alpaca`, and `GPT conversions`.
26
37
27
38
# Multilingual Content Writing Assistant
28
39
@@ -45,18 +56,17 @@ It enhances text readability, aligns with linguistic nuances, and preserves orig
45
56
- Aligns rewritten content with SEO best practices for discoverability.
46
57
47
58
#### 4. **Professional and Multilingual Expertise**
48
-
- Fully support for creating template with local language.
49
-
- Supports multiple languages with advanced vocabulary and grammar enhancement.
50
-
- Adapts tone and style to maintain professionalism and clarity.
51
-
- Support hidden mask input text.
52
-
- Optional: learn vocabulary enhancement with unigrams, bigrams and trigrams instruction template.
53
-
- Full documentation, easy configuration prompts with examples.
59
+
- Full support for creating templates in local languages.
60
+
- Supports multiple languages with advanced prompting techniques.
61
+
- Vocabulary and grammar enhancement with unigrams, bigrams, and trigrams instruction template.
62
+
- Supports hidden mask input text. Adapts tone and style to maintain professionalism and clarity.
63
+
- Full documentation with easy configuration prompts and examples.
54
64
55
65
#### 5. **Customize Advanced Response Structure and Dataset Format**
56
-
-Fully support for advanced structure response format customization.
57
-
-Support output multiple formats such as Alpaca, GPT, STF text.
58
-
-Can be used with other models such as LLama.
59
-
-Dynamic prompts are enhanced using Round-Robin loop.
66
+
-Supports advanced response structure format customization.
67
+
-Compatible with other models such as LLaMa.
68
+
-Enhances dynamic prompts using Round-Robin loops.
69
+
-Outputs multiple formats such as Alpaca, GPT, and STF text.
60
70
61
71
**Installation**
62
72
----------------
@@ -82,7 +92,7 @@ Start using Gemma Template with just a few lines of code:
82
92
```python
83
93
from gemma_template.models import*
84
94
85
-
prompt_instance= Template(
95
+
template_instance= Template(
86
96
structure_field=StructureField(
87
97
title=["Custom Title"],
88
98
description=["Custom Description"],
@@ -93,11 +103,7 @@ prompt_instance = Template(
93
103
),
94
104
) # Create fully customized structured reminders.
95
105
96
-
response = prompt_instance.template(
97
-
template=GEMMA_TEMPLATE,
98
-
user_template=USER_TEMPLATE,
99
-
instruction_template=INSTRUCTION_TEMPLATE,
100
-
structure_template=STRUCTURE_TEMPLATE,
106
+
response = template_instance.template(
101
107
title="Gemma open models",
102
108
description="Gemma: Introducing new state-of-the-art open models.",
103
109
document="Gemma open models are built from the same research and technology as Gemini models. Gemma 2 comes in 2B, 9B and 27B and Gemma 1 comes in 2B and 7B sizes.",
0 commit comments