Upload 9 files
Browse files- .gitattributes +1 -34
- README.md +119 -3
- config.json +44 -0
- generation_config.json +7 -0
- model.safetensors +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +44 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,2 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
tokenizer.model filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
|
@@ -1,3 +1,119 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- josedamico/sugarcane
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
base_model:
|
| 8 |
+
- TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 9 |
+
tags:
|
| 10 |
+
- sugarcane
|
| 11 |
+
---
|
| 12 |
+
# 🌱 TinyLLaMA-Sugarcane
|
| 13 |
+
|
| 14 |
+
Welcome to the *first open-source LLM fine-tuned for sugarcane production*! 🧠🌾
|
| 15 |
+
|
| 16 |
+
This model is a fine-tuned version of [`TinyLLaMA`](https://huggingface.co/czi/TinyLlama-1.1B-Chat-v1.0), trained specifically on sugarcane-focused data. Developed by [SciCrop](https://scicrop.com) as part of its commitment to open innovation in agriculture, this is one of the first domain-specific small language models (SLMs) created for the agribusiness sector.
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 🚜 Why Sugarcane?
|
| 21 |
+
|
| 22 |
+
Sugarcane is one of the most important crops in Brazil and globally — but most LLMs know very little about its specific production cycle, challenges, and terminology.
|
| 23 |
+
|
| 24 |
+
By fine-tuning TinyLLaMA on 2,000+ question/answer pairs from real-world sugarcane use cases, we aim to deliver:
|
| 25 |
+
|
| 26 |
+
- ✅ Better accuracy
|
| 27 |
+
- ✅ Clearer answers
|
| 28 |
+
- ✅ Local deployment capabilities for agricultural experts, cooperatives, and researchers
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## 🔍 Model Details
|
| 33 |
+
|
| 34 |
+
- **Base model**: `TinyLLaMA-1.1B-Chat`
|
| 35 |
+
- **Fine-tuned on**: Domain-specific QA pairs related to sugarcane
|
| 36 |
+
- **Architecture**: Causal LM with LoRA + QLoRA
|
| 37 |
+
- **Tokenizer**: `LLaMATokenizer`
|
| 38 |
+
- **Model size**: ~1.1B parameters
|
| 39 |
+
- **Format**: Available in both HF standard and `GGUF` for local/Ollama use
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## 🧪 Try it locally with Ollama
|
| 44 |
+
|
| 45 |
+
We believe local models are the future for privacy-sensitive, domain-specific AI.
|
| 46 |
+
|
| 47 |
+
You can run this model locally using [Ollama](https://ollama.com):
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
ollama run infinitestack/tinyllama-sugarcane
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
👉 Or explore the model directly:
|
| 54 |
+
https://ollama.com/infinitestack/tinyllama-sugarcane
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## 🌐 About InfiniteStack
|
| 59 |
+
|
| 60 |
+
This model is part of **InfiniteStack**, a platform by [SciCrop](https://scicrop.com) that helps companies in the agri-food-energy-environment chain create, train, and deploy their own AI and analytics solutions — securely and at scale.
|
| 61 |
+
|
| 62 |
+
### 📦 InfiniteStack offers:
|
| 63 |
+
|
| 64 |
+
- A containerized platform that runs on-prem or in private cloud
|
| 65 |
+
- Full support for **SLMs and LLMs** using your **real and private data**
|
| 66 |
+
- No/Low-code interfaces to *Collect*, *Automate*, *Leverage*, *Catalog*, *Observe*, and *Track* data pipelines and AI assets
|
| 67 |
+
|
| 68 |
+
🌐 Learn more: https://infinitestack.ai
|
| 69 |
+
|
| 70 |
+
---
|
| 71 |
+
|
| 72 |
+
## 🧠 Why Small Language Models (SLMs)?
|
| 73 |
+
|
| 74 |
+
SLMs are great when:
|
| 75 |
+
|
| 76 |
+
- You need local inference (offline, on-device, or private)
|
| 77 |
+
- Your domain is narrow and specific
|
| 78 |
+
- You want full control over fine-tuning and usage
|
| 79 |
+
- You care about speed, size, and cost-efficiency
|
| 80 |
+
|
| 81 |
+
Big isn’t always better. Sometimes, smart and focused beats giant and generic. 💡
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## 🤝 Community & Open Innovation
|
| 86 |
+
|
| 87 |
+
This work reflects SciCrop’s ongoing commitment to the open-source ecosystem, and to creating useful, usable AI for real-world agribusiness.
|
| 88 |
+
|
| 89 |
+
Feel free to fork, contribute, fine-tune further, or use it in your own ag project.
|
| 90 |
+
We’d love to hear how you're using it!
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## 📂 Files included
|
| 95 |
+
|
| 96 |
+
This repo includes:
|
| 97 |
+
|
| 98 |
+
- `config.json`
|
| 99 |
+
- `tokenizer.model`
|
| 100 |
+
- `tokenizer.json`
|
| 101 |
+
- `model.safetensors`
|
| 102 |
+
- `special_tokens_map.json`
|
| 103 |
+
- `generation_config.json`
|
| 104 |
+
- `tokenizer_config.json`
|
| 105 |
+
- `README.md`
|
| 106 |
+
|
| 107 |
+
A merged and converted `.gguf` version is also available at **Ollama Hub**.
|
| 108 |
+
|
| 109 |
+
---
|
| 110 |
+
|
| 111 |
+
## 📬 Questions or Contributions?
|
| 112 |
+
|
| 113 |
+
Ping us at:
|
| 114 | |
| 115 |
+
🌐 https://scicrop.com
|
| 116 |
+
🌱 https://infinitestack.ai
|
| 117 |
+
|
| 118 |
+
Made with ☕, 🌾 and ❤️ in Brazil
|
| 119 |
+
by @josedamico and the InfiniteStack team
|
config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"head_dim": 64,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 2048,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 5632,
|
| 14 |
+
"max_position_embeddings": 2048,
|
| 15 |
+
"mlp_bias": false,
|
| 16 |
+
"model_type": "llama",
|
| 17 |
+
"num_attention_heads": 32,
|
| 18 |
+
"num_hidden_layers": 22,
|
| 19 |
+
"num_key_value_heads": 4,
|
| 20 |
+
"pretraining_tp": 1,
|
| 21 |
+
"quantization_config": {
|
| 22 |
+
"_load_in_4bit": true,
|
| 23 |
+
"_load_in_8bit": false,
|
| 24 |
+
"bnb_4bit_compute_dtype": "float32",
|
| 25 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 26 |
+
"bnb_4bit_quant_type": "fp4",
|
| 27 |
+
"bnb_4bit_use_double_quant": false,
|
| 28 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 29 |
+
"llm_int8_has_fp16_weight": false,
|
| 30 |
+
"llm_int8_skip_modules": null,
|
| 31 |
+
"llm_int8_threshold": 6.0,
|
| 32 |
+
"load_in_4bit": true,
|
| 33 |
+
"load_in_8bit": false,
|
| 34 |
+
"quant_method": "bitsandbytes"
|
| 35 |
+
},
|
| 36 |
+
"rms_norm_eps": 1e-05,
|
| 37 |
+
"rope_scaling": null,
|
| 38 |
+
"rope_theta": 10000.0,
|
| 39 |
+
"tie_word_embeddings": false,
|
| 40 |
+
"torch_dtype": "float16",
|
| 41 |
+
"transformers_version": "4.50.0",
|
| 42 |
+
"use_cache": true,
|
| 43 |
+
"vocab_size": 32000
|
| 44 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 1,
|
| 3 |
+
"eos_token_id": 2,
|
| 4 |
+
"max_length": 2048,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.50.0"
|
| 7 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0994e22bd729a4bd6958fbe99d269af861d6683fab1d64bd9bc5400d99fc552
|
| 3 |
+
size 134
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<unk>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"2": {
|
| 23 |
+
"content": "</s>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"bos_token": "<s>",
|
| 32 |
+
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 33 |
+
"clean_up_tokenization_spaces": false,
|
| 34 |
+
"eos_token": "</s>",
|
| 35 |
+
"extra_special_tokens": {},
|
| 36 |
+
"legacy": false,
|
| 37 |
+
"model_max_length": 2048,
|
| 38 |
+
"pad_token": "</s>",
|
| 39 |
+
"padding_side": "right",
|
| 40 |
+
"sp_model_kwargs": {},
|
| 41 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 42 |
+
"unk_token": "<unk>",
|
| 43 |
+
"use_default_system_prompt": false
|
| 44 |
+
}
|