Downloads · 30 days
10
4% of all-time downloads
apfurman/gemma-dolly-agriculture
gemma-dolly-agriculture is a machine learning model from apfurman. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as gemma.
This model is based on google/gemma-2b, fine tuned with the dolly-qa dataset and some specific examples of agricultural disease descriptions. It achieves the following results on the evaluation set: - Loss: 2.0198
Downloads · 30 days
10
4% of all-time downloads
All-time downloads
225
Public
Repo size
649 MB
Likes
2
Public
Click a slice to open those files.
.safetensors157 MB · 88%
From the Hugging Face model README
This model is based on google/gemma-2b, fine tuned with the dolly-qa dataset and some specific examples of agricultural disease descriptions. It achieves the following results on the evaluation set:
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
model_id = "google/gemma-2b"
peft_model_id = "apfurman/gemma-dolly-agriculture"
# make sure you have access to gemma-2b as well
model = AutoModelForCausalLM.from_pretrained(model_id, token="YOUR_TOKEN_HERE")
model.load_adapter(peft_model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id, token="YOUR_TOKEN_HERE")
def ask(prompt):
inputs = tokenizer(prompt, return_tensors="pt").input_ids
with torch.inference_mode():
tokens = model.generate(
inputs,
pad_token_id=128001,
eos_token_id=128001,
max_new_tokens=200,
repetition_penalty=1.5,
)
return tokenizer.decode(tokens[0], skip_special_tokens=True)
Created for prompting an AI about agricultural info, but more fine-tuning is needed as current results are not great.
Trained on Intel Data Center GPU Max Series with Intel Developer Cloud running a jupyter notebook.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.918 | 1.6393 | 100 | 2.5702 |
| 2.4342 | 3.2787 | 200 | 2.2747 |
| 2.2482 | 4.9180 | 300 | 2.1601 |
| 2.1554 | 6.5574 | 400 | 2.0971 |
| 2.1022 | 8.1967 | 500 | 2.0698 |
| 2.0806 | 9.8361 | 600 | 2.0544 |
| 2.0651 | 11.4754 | 700 | 2.0437 |
| 2.0439 | 13.1148 | 800 | 2.0359 |
| 2.0369 | 14.7541 | 900 | 2.0302 |
| 2.034 | 16.3934 | 1000 | 2.0263 |
| 2.0249 | 18.0328 | 1100 | 2.0236 |
| 2.0174 | 19.6721 | 1200 | 2.0218 |
| 2.0154 | 21.3115 | 1300 | 2.0203 |
| 2.0145 | 22.9508 | 1400 | 2.0198 |