aznatkoiny commited on
Commit
898f519
1 Parent(s): bcb165b

Update README

Browse files
Files changed (1) hide show
  1. README.md +63 -1
README.md CHANGED
@@ -4,4 +4,66 @@ language:
4
  - en
5
  base_model:
6
  - google/gemma-2-2b
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - en
5
  base_model:
6
  - google/gemma-2-2b
7
+ ---
8
+ # GemmaLM-for-Cannabis
9
+
10
+ This repository contains a fine-tuned version of the Gemma 2B model, specifically adapted for cannabis-related queries using Low Rank Adaptation (LoRA).
11
+
12
+ ## Model Details
13
+
14
+ - **Base Model**: Gemma 2B
15
+ - **Fine-tuning Method**: Low Rank Adaptation (LoRA)
16
+ - **LoRA Rank**: 4
17
+ - **Training Data**: Custom dataset derived from cannabis strain information
18
+ - **Task**: Causal Language Modeling for cannabis-related queries
19
+
20
+ ## Fine-tuning Process
21
+
22
+ The model was fine-tuned using a custom dataset created from cannabis strain information. The dataset includes details about various cannabis strains, their effects, flavors, and descriptions. The fine-tuning process involved:
23
+
24
+ 1. Preprocessing the cannabis dataset into a prompt-response format
25
+ 2. Implementing LoRA with a rank of 4 to efficiently adapt the model
26
+ 3. Training for a limited number of epochs with a small subset of data for demonstration purposes
27
+
28
+ ## Usage
29
+
30
+ This model can be used to generate responses to cannabis-related queries. Example usage:
31
+
32
+ ```python
33
+ import keras
34
+ import keras_nlp
35
+
36
+ # Load the model
37
+ model = keras.models.load_model("gemma_lm_model.keras")
38
+
39
+ # Set up the sampler
40
+ sampler = keras_nlp.samplers.TopKSampler(k=5, seed=2)
41
+ model.compile(sampler=sampler)
42
+
43
+ # Generate a response
44
+ prompt = "Instruction:\nWhat does OG Kush feel like\nResponse:\n"
45
+ response = model.generate(prompt, max_length=256)
46
+ print(response)
47
+ ```
48
+
49
+ ## Limitations
50
+
51
+ - The model was fine-tuned on a limited dataset for demonstration purposes. For production use, consider training on a larger dataset for more epochs.
52
+ - The current LoRA rank is set to 4, which may limit the model's adaptability. Experimenting with higher ranks could potentially improve performance.
53
+
54
+ ## Future Improvements
55
+
56
+ To enhance the model's performance, consider:
57
+
58
+ 1. Increasing the size of the fine-tuning dataset
59
+ 2. Training for more epochs
60
+ 3. Experimenting with higher LoRA rank values
61
+ 4. Adjusting hyperparameters such as learning rate and weight decay
62
+
63
+ ## License
64
+
65
+ Please refer to the Gemma model's original license for usage terms and conditions.
66
+
67
+ ## Acknowledgements
68
+
69
+ This project uses the Gemma model developed by Google. We acknowledge the Keras and KerasNLP teams for providing the tools and frameworks used in this project.