Model Card for Qwen2.5-7B-Instruct-impactchannel
Model Description
Using the Qwen2.5-7B-Instruct model as a starting point, the Qwen2.5-7B-Instruct-impactchannel Language Model is additionally fine-tuned on a 3.4k train dataset to detect whether a text contains an indication of a firm stating an impact directly through its assets or indirectly through economic flows (see also prompt).
We follow the unsloth fine-tuning setup in this work. The model is fine-tuned with the prompt template given below.
How to Get Started With the Model
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 = "extreme-weather-impacts/Qwen2.5-7B-Instruct-impactchannel"
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_channel = """You are given a TEXT of a company disclosure that discusses extreme weather exposure of the company. Your task is to determine whether the company was impacted directly through its assets and/or indirectly through economic flows.
Here is the TEXT from the company’s disclosure:
[begin of TEXT]
{text}
[end of TEXT]
Answer the following question:
- Based on the TEXT, was the company impacted through assets and/or economic flows?
Decision Guidelines:
- Asset impact: immediate physical destruction or damage inflicted upon the company’s assets as a direct consequence of the extreme weather event itself.
- Economic flows impact: deviations from the normal or expected flow of production, income, or spending due to the disaster's disruption. Every asset impact is also an economic flow impact.
- None: if you cannot clearly determine whether the company was exposed through assets or economic flows, give a "None" verdict (e.g., sentence too short to decide).
Output Format:
Answer in a JSON file with three keys "asset", "economic_flows", and "none". Give a value of 1 if the respective category is present in the text, and 0 otherwise.
Your Output:
"""
# some example texts
text_1 = "Hurricane Katrina has caused severe supply chain disruptions for our business. As a consquence, we could not serve our own customers on time."
text_2 = "During Winter Storm Uri, our sales in oil and gas products increased drastically."
text_3 = "Our insurance covered lat year's losses suffered on our facilities due to severe floods in Alabama."
texts = [text_1, text_2, text_3]
prompt_1 = prompt_template_impact_channel.format(text=text_1)
prompt_2 = prompt_template_impact_channel.format(text=text_2)
prompt_3 = prompt_template_impact_channel.format(text=text_3)
# demo prompts
raw_prompts = [
[{'role': 'user', 'content': prompt_1}],
[{'role': 'user', 'content': prompt_2}],
[{'role': 'user', 'content': prompt_3}]
]
# 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, max_tokens=100, stop=[]) # Don't stop on any tokens
# 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")
More details can be found in the paper
@article{Schimanski25extremeweatherimpacts,
title={{What Firms Actually Lose (and Gain) from Extreme Weather Event Impacts}},
author={Tobias Schimanski and Glen Gostlow and Malte Toetzke and Markus Leippold},
year={2025},
journal={Soon available on SSRN},
}
- Downloads last month
- 19
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support