climate-adaptation/adaptation-test-set
Viewer • Updated • 1k • 30
Using the Qwen2.5-7B-Instruct model as a starting point, the Qwen2.5-7B-Instruct-impact Language Model is additionally fine-tuned on a 6k train dataset to detect whether a text contains an indication of a firm stating climate change adaptation categories risk assessment, physical protection, adaptive operations, risk transfer or financial reserves (see also prompt).
I follow the unsloth fine-tuning setup in this work. The model is fine-tuned with the prompt template given below.
You can use the model in the following way:
from vllm import LLM, SamplingParams
from unsloth.chat_templates import get_chat_template
from transformers import AutoTokenizer
# load model
model_name = "climate-adaptation/Qwen2.5-7B-Instruct-categories"
llm = LLM(model=model_name)
# load tokenizer with the correct chat template
tokenizer = AutoTokenizer.from_pretrained(model_name) # "Qwen/Qwen2.5-7B"
tokenizer = get_chat_template(tokenizer, chat_template="qwen-2.5")
# prompt template
prompt_template_impact = """You are an expert in analyzing firms' disclosure towards sustainability. You are presented with a <text> relating to a firm's climate change adaptation from its disclosure. Your task is to decide whether it contains evidence of a firm's climate change adaptation with respect to the categories risk assessment, physical protection, adaptive operations, risk transfer or financial reserves.
<text>:
-----
{text}
-----
Definitions of climate change adaptation categories:
- Risk Assessment: Activities that identify, measure, or evaluate a firm’s exposure, sensitivity, or vulnerability to current or expected physical climate risks.
- Physical Protection: Actions that physically strengthen, harden, or redesign assets and infrastructure to withstand or reduce damage from climate-related hazards.
- Adaptive Operations: Actions that maintain or restore operations during climate disruptions by restructuring operations, asset locations, products/services, or supply chains to ensure business continuity or reduce exposure and dependency.
- Risk Transfer: Financial or contractual mechanisms that shift, share, or hedge the financial consequences of physical climate risks away from the firm (e.g., extreme weather insurance).
- Financial Reserves: Actions that set aside internal capital (e.g., reserves, dedicated recovery funds, self-insurance) to absorb and finance recovery costs from climate-related disruptions.
Decide whether the text mentions adaptation risk assessment, physical protection, adaptive operations, risk transfer, or financial reserves.
Output a single JSON object with the keys "risk_assessment", "physical_protection", "adaptive_operations", "risk_transfer", "financial_reserves". Use "yes"/"no" values only. Multiple categories may be "yes".
Output only the JSON object (no markdown, no extra text):
"""
# some example texts
text_1 = "The most severe forward-looking risks for our firm are hurricanes and wildfires."
text_2 = "Last year, a large freeze in Texas resulted in the closure of our production facilities."
texts = [text_1, text_2]
prompt_1 = prompt_template_impact.format(text=text_1)
prompt_2 = prompt_template_impact.format(text=text_2)
# demo prompts
raw_prompts = [
[{'role': 'user', 'content': prompt_1}],
[{'role': 'user', 'content': prompt_2}]
]
# apply the correct chat template formatting
formatted_prompts = [
tokenizer.apply_chat_template(convo, tokenize=False, add_generation_prompt=True)
for convo in raw_prompts
]
# set sampling parameters
sampling_params = SamplingParams(temperature = 0.01, min_p = 0.1)
# run inference
outputs = llm.generate(formatted_prompts, sampling_params)
# print outputs
answers = []
for i, output in enumerate(outputs):
generated_text = output.outputs[0].text
answers.append(generated_text)
print(f"Text under investigation: {texts[i]!r}\nGenerated Answer (Impact?): {generated_text!r}\n")
@article{Schimanski26adaptation,
title={{Firm-level Climate Change Adaptation}},
author={Tobias Schimanski},
year={2026},
journal={Available on SSRN},
}