Text Generation
PEFT
Safetensors
English
llama
qlora
llama-3
geopolitical-forecasting
gdelt
conversational
Instructions to use nafis8766/geopolitical-forecasting-llm-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use nafis8766/geopolitical-forecasting-llm-merged with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Geopolitical Forecasting LLM (Llama-3 3B)
This model is a fine-tuned version of meta-llama/Llama-3.2-3B-Instruct specifically trained to act as an expert geopolitical analyst. It takes raw intelligence and event data (such as GDELT conflict metrics, Goldstein scales, and media tone) and generates structured, evidence-based forecasts on short-term trajectories and long-term perspectives.
π» Model Details
- Base Model: Llama-3.2-3B-Instruct
- Architecture: 4-bit Quantized Low-Rank Adaptation (QLoRA)
- Parameters: 3.2 Billion
- Training Data: Synthesized from 20+ years of raw GDELT (Global Database of Events, Language, and Tone) archives, yielding a ~100k sample instruction-tuning dataset.
- Language: English
π How to use
You can easily test the model through the interactive Gradio UI via Google Colab: Launch Interactive Colab Demo
Or load the model directly using standard PyTorch and Transformers:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# 1. Load the Base Model
base_model_id = "meta-llama/Llama-3.2-3B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# 2. Load this fine-tuned LoRA adapter
adapter_repo = "nafis8766/geopolitical-forecasting-llm-merged"
model = PeftModel.from_pretrained(base_model, adapter_repo)
# 3. Format the Prompt
events = "On May 10, 2025, border skirmishes were reported..."
messages = [
{"role": "system", "content": "You are an expert geopolitical analyst..."},
{"role": "user", "content": f"Analyze the following events and forecast the short-term trajectory:\n{events}"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=1024)
print(tokenizer.decode(outputs[0]))
π§ Intended Use & Limitations
- Intended Use: Designed for academic research, intelligence analysis, and geopolitical simulations. It excels at recognizing historical patterns in armed conflict, diplomacy, and media sentiment.
- Limitations: The model's forecasts are probabilistic and based on historical training data. It should not be used as the sole basis for real-world decision-making or policy creation.
π Project Links
- GitHub Repository (Data Pipeline & MLOps): nafis8766/Geopolitical-Forecasting-LLM
- Downloads last month
- -
Model tree for nafis8766/geopolitical-forecasting-llm-merged
Base model
meta-llama/Llama-3.2-3B-Instruct