Upload AgriSagot Philippine agricultural BERT model
Browse files- README.md +91 -0
- config.json +25 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- agriculture
|
| 4 |
+
- bert
|
| 5 |
+
- philippine-agriculture
|
| 6 |
+
- crop-disease
|
| 7 |
+
- recommendation
|
| 8 |
+
- agrisagot
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
license: mit
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# AgriSagot BERT - Philippine Agricultural Recommender
|
| 15 |
+
|
| 16 |
+
This model is fine-tuned on Philippine agricultural data for crop disease and pesticide recommendations, specifically designed for the AgriSagot application.
|
| 17 |
+
|
| 18 |
+
## Model Description
|
| 19 |
+
|
| 20 |
+
- **Base Model**: BERT-base-uncased
|
| 21 |
+
- **Training Data**: Philippine registered agricultural products (as of August 2025)
|
| 22 |
+
- **Use Case**: Agricultural product recommendations based on crop and disease
|
| 23 |
+
- **Language**: English
|
| 24 |
+
- **Country**: Philippines
|
| 25 |
+
- **Application**: AgriSagot - Smart Agricultural Advisory System
|
| 26 |
+
|
| 27 |
+
## Usage
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoModel, AutoTokenizer
|
| 31 |
+
|
| 32 |
+
model = AutoModel.from_pretrained("Hayme/agrisago-bert")
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained("Hayme/agrisago-bert")
|
| 34 |
+
|
| 35 |
+
# Use for generating embeddings
|
| 36 |
+
inputs = tokenizer("rice blast treatment", return_tensors="pt")
|
| 37 |
+
outputs = model(**inputs)
|
| 38 |
+
embeddings = outputs.last_hidden_state.mean(dim=1)
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## API Usage
|
| 42 |
+
|
| 43 |
+
```javascript
|
| 44 |
+
// In your AgriSagot API
|
| 45 |
+
const response = await hf.featureExtraction({
|
| 46 |
+
model: 'Hayme/agrisago-bert',
|
| 47 |
+
inputs: 'rice brown planthopper treatment'
|
| 48 |
+
});
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Training Data
|
| 52 |
+
|
| 53 |
+
Trained on the official "UPDATED LIST OF REGISTERED PRODUCTS As of August 31, 2025" from Philippine regulatory authorities, containing comprehensive information about:
|
| 54 |
+
|
| 55 |
+
- Agricultural pesticides
|
| 56 |
+
- Fertilizers
|
| 57 |
+
- Plant growth regulators
|
| 58 |
+
- Crop protection products
|
| 59 |
+
- Target crops and pests/diseases
|
| 60 |
+
- Active ingredients and formulations
|
| 61 |
+
|
| 62 |
+
## Intended Use
|
| 63 |
+
|
| 64 |
+
- Crop disease identification and treatment recommendations
|
| 65 |
+
- Agricultural product recommendations for Philippine farmers
|
| 66 |
+
- Pesticide matching for specific crop-disease combinations
|
| 67 |
+
- Integration with AgriSagot mobile and web applications
|
| 68 |
+
- Philippine agricultural advisory and extension services
|
| 69 |
+
|
| 70 |
+
## Performance
|
| 71 |
+
|
| 72 |
+
This model understands Philippine-specific agricultural contexts including:
|
| 73 |
+
- Local crop varieties (rice, corn, tomato, etc.)
|
| 74 |
+
- Common Philippine pests and diseases
|
| 75 |
+
- Available agricultural products in the Philippine market
|
| 76 |
+
- Regulatory-approved treatment options
|
| 77 |
+
|
| 78 |
+
## Limitations
|
| 79 |
+
|
| 80 |
+
- Trained specifically on Philippine agricultural data
|
| 81 |
+
- Recommendations should be verified with local agricultural experts
|
| 82 |
+
- Not suitable for other countries' agricultural systems without adaptation
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
If you use this model, please cite:
|
| 87 |
+
```
|
| 88 |
+
AgriSagot BERT Model (2025)
|
| 89 |
+
Trained on Philippine Agricultural Product Database
|
| 90 |
+
Available at: https://huggingface.co/Hayme/agrisago-bert
|
| 91 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 3072,
|
| 14 |
+
"layer_norm_eps": 1e-12,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"model_type": "bert",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 12,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"transformers_version": "4.57.1",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 30522
|
| 25 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:019aa07f3b343bd542efdf5b843a91d764fc03bd49ef07db870f13be5164bd21
|
| 3 |
+
size 437951328
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "[PAD]",
|
| 51 |
+
"sep_token": "[SEP]",
|
| 52 |
+
"strip_accents": null,
|
| 53 |
+
"tokenize_chinese_chars": true,
|
| 54 |
+
"tokenizer_class": "BertTokenizer",
|
| 55 |
+
"unk_token": "[UNK]"
|
| 56 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|