Text Generation
Transformers
Safetensors
English
llama
gis
geospatial
fine-tuned
conversational
text-generation-inference
Instructions to use Ispatialtechnosolutions/BraeinAi-Geospatial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ispatialtechnosolutions/BraeinAi-Geospatial with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ispatialtechnosolutions/BraeinAi-Geospatial") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ispatialtechnosolutions/BraeinAi-Geospatial") model = AutoModelForCausalLM.from_pretrained("Ispatialtechnosolutions/BraeinAi-Geospatial", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ispatialtechnosolutions/BraeinAi-Geospatial with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ispatialtechnosolutions/BraeinAi-Geospatial" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ispatialtechnosolutions/BraeinAi-Geospatial", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ispatialtechnosolutions/BraeinAi-Geospatial
- SGLang
How to use Ispatialtechnosolutions/BraeinAi-Geospatial with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ispatialtechnosolutions/BraeinAi-Geospatial" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ispatialtechnosolutions/BraeinAi-Geospatial", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ispatialtechnosolutions/BraeinAi-Geospatial" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ispatialtechnosolutions/BraeinAi-Geospatial", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ispatialtechnosolutions/BraeinAi-Geospatial with Docker Model Runner:
docker model run hf.co/Ispatialtechnosolutions/BraeinAi-Geospatial
| library_name: transformers | |
| tags: | |
| - gis | |
| - geospatial | |
| - fine-tuned | |
| - text-generation | |
| license: apache-2.0 | |
| language: | |
| - en | |
| base_model: | |
| - meta-llama/Llama-2-7b-chat | |
| # Model Card for Model ID | |
| **BraeinAi Geospatial** is a fine-tuned version of Meta’s [LLaMA-2](https://huggingface.co/meta-llama) model for **Geographic Information Systems (GIS)** tasks. | |
| It is designed to assist with spatial data concepts, GIS software usage, standards (OGC WMS/WFS/WCS), and related technical queries. | |
| - **Developed by:** Ispatialtechnosolutions | |
| - **Model type:** Causal Language Model | |
| - **Language(s):** English | |
| - **License:** Apache 2.0 | |
| - **Base Model:** LLaMA-2 (Meta) | |
| - **Fine-tune method:** LoRA → merged weights | |
| - **Intended use:** GIS assistant (ArcGIS/ArcPy/QGIS/WMS/WFS/Portal) | |
| --- | |
| ## Model Details | |
| ### Model Description | |
| **BraeinAi Geospatial** is a fine-tuned version of Meta’s [LLaMA-2](https://huggingface.co/meta-llama) model for **Geographic Information Systems (GIS)** tasks. | |
| It is designed to assist with spatial data concepts, GIS software usage, standards (OGC WMS/WFS/WCS), and related technical queries. | |
| This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. | |
| - **Developed by:** Ispatialtechnosolutions | |
| - **Funded by [optional]:** [More Information Needed] | |
| - **Shared by [optional]:** [More Information Needed] | |
| - **Model type:** Causal Language Model | |
| - **Language(s) (NLP):** English | |
| - **License:** Apache 2.0 | |
| ### Model Sources [optional] | |
| - **Repository:** [Ispatialtechnosolutions/BraeinAi-Geospatial](https://huggingface.co/Ispatialtechnosolutions/BraeinAi-Geospatial) | |
| ## Uses | |
| ### Direct Use | |
| - Answering GIS-related technical queries | |
| - Helping with geospatial software usage (e.g., QGIS, ArcGIS, GDAL) | |
| - Assisting with OGC standards (WMS, WFS, WMTS, etc.) | |
| - Supporting spatial data processing and remote sensing tasks | |
| ### Downstream Use [optional] | |
| - Integrating into GIS chatbots | |
| - Embedding in decision-support tools for spatial analysis | |
| - Educational use in GIS learning environments | |
| ### Out-of-Scope Use | |
| - Integrating into GIS chatbots | |
| - Embedding in decision-support tools for spatial analysis | |
| - Educational use in GIS learning environments | |
| ## Bias, Risks, and Limitations | |
| - May generate **hallucinated commands** for GIS software not grounded in documentation | |
| - Limited to **English-language queries** | |
| - Not a replacement for domain experts in mission-critical applications | |
| ### Recommendations | |
| - Validate outputs before production use | |
| - Use in supervised / decision-support settings, not as final authority | |
| --- | |
| ## How to Get Started with the Model | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline | |
| repo_id = "Ispatialtechnosolutions/BraeinAi-Geospatial" | |
| tok = AutoTokenizer.from_pretrained(repo_id) | |
| model = AutoModelForCausalLM.from_pretrained(repo_id) | |
| pipe = pipeline("text-generation", model=model, tokenizer=tok) | |
| print(pipe("How do I publish a WMS in GeoServer?", max_new_tokens=200)[0]["generated_text"]) | |
| ## Training Details | |
| ### Training Data | |
| This model was fine-tuned on a curated GIS domain dataset including: | |
| Spatial standards (OGC WMS/WFS/WMTS/WCS docs) | |
| GIS tutorials & training manuals | |
| QGIS/ArcGIS user documentation | |
| Geospatial developer blogs | |
| ### Training Procedure | |
| Base Model: LLaMA-2 | |
| Method: LoRA fine-tuning | |
| Precision: bf16 mixed precision | |
| Batch size per device: 1–2 | |
| Gradient accumulation steps: 8–16 | |
| Effective batch size: 4 | |
| Epochs: 2 | |
| LR = 2e-4 | |
| ## Evaluation | |
| Metrics | |
| Perplexity: Lower than base LLaMA-2 on GIS test set | |
| Qualitative evaluation: Produces domain-specific and contextually relevant answers | |
| Example Query & Response | |
| Input: "What is the difference between WMS and WFS?" | |
| Output: "WMS (Web Map Service) delivers rendered images of maps, while WFS (Web Feature Service) delivers vector features in formats like GML/GeoJSON for analysis." | |
| ## Environmental Impact | |
| Training hardware: A100 128GB RAM GPUs | |
| 24gb Graphic Card | |
| ## Technical Specifications [optional] | |
| ### Model Architecture and Objective | |
| Architecture: LLaMA-2 (Causal Decoder-only Transformer) | |
| Parameter count: Same as LLaMA-2 base used | |
| Library: Transformers | |
| ## Citation [optional] | |
| @misc{llama2gis2024, | |
| title = {BraeinAi-Geospatial: A Domain-Specialized GIS Language Model}, | |
| author = {Ispatialtechnosolutions}, | |
| year = {2024}, | |
| publisher = {Hugging Face}, | |
| howpublished = {\url{https://huggingface.co/Ispatialtechnosolutions/BraeinAi-Geospatial}}, | |
| } | |
| ## Model Card Contact | |
| Maintainer: Ispatialtechnosolutions | |
| Email: connectus@ispatialtec.com |