Readme Updated
Browse files
README.md
CHANGED
|
@@ -1,21 +1,39 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
tags:
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- transformers
|
| 6 |
-
- unsloth
|
| 7 |
-
- llama
|
| 8 |
-
license: apache-2.0
|
| 9 |
language:
|
| 10 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: llama3.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
+
- sql
|
| 6 |
+
- py
|
| 7 |
+
tags:
|
| 8 |
+
- gis
|
| 9 |
+
- geospatial
|
| 10 |
+
- fine-tuned
|
| 11 |
+
- unsloth
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# 🗺️ Llama-3.1-8B-GIS-Expert
|
| 16 |
+
|
| 17 |
+
This model is a fine-tuned version of **Llama-3.1-8B-Instruct**, specialized for **Geospatial Analysis (GIS)**.
|
| 18 |
+
|
| 19 |
+
## 🧠 Capabilities
|
| 20 |
+
It has been trained on a multi-task dataset to handle three specific roles:
|
| 21 |
+
1. **PostGIS Expert:** Converts natural language questions into valid `PostgreSQL` / `PostGIS` SQL queries.
|
| 22 |
+
2. **Python GIS Developer:** Writes Python scripts using `geopandas`, `shapely`, and `rasterio`.
|
| 23 |
+
3. **Geospatial Analyst:** Explains spatial relationships and topology logic.
|
| 24 |
+
|
| 25 |
+
## 💻 How to Use
|
| 26 |
|
| 27 |
+
### System Prompts (Crucial)
|
| 28 |
+
To get the best results, you must use the correct System Prompt for the task:
|
| 29 |
+
* **For SQL:** "You are a PostGIS expert. Convert the question into a SQL query."
|
| 30 |
+
* **For Python:** "You are a Python GIS developer. Write a script to solve the geospatial problem."
|
| 31 |
+
* **For Reasoning:** "You are a Geospatial Analyst. Explain the spatial relationship."
|
| 32 |
|
| 33 |
+
### Example Code
|
| 34 |
+
```python
|
| 35 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 36 |
|
| 37 |
+
model_id = "kumarprince070107/Llama-3.1-8B-GIS-v2"
|
| 38 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 39 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|