Model Card for Qwen2.5-7B-Instruct-impactdirectionality
Model Description
Using the Qwen2.5-7B-Instruct model as a starting point, the Qwen2.5-7B-Instruct-impactdirectionality Language Model is additionally fine-tuned on a 3.4k train dataset to detect whether a text contains an indication of a firm stating a positive, neutral, negative impact, or a reimbursement (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-impactdirectionality"
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_directionality = """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 positively, neutrally, or negatively impacted by the extreme weather exposure or obtained a reimbursement.
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 impact on the company positive, neutral, or negative, or did the company obtain a reimbursement?
Decision Guidelines:
- Positive impact: The company obtained an advantage as a result of the extreme weather exposure, e.g., economic benefits like higher sales.
- Negative impact: The company experienced an extreme weather impact or unfavorable outcomes from extreme weather exposure, e.g., economic losses. If the company reports a positive economic development that offsets the extreme weather impact, it is still a negative impact.
- Neutral impact: The company discusses extreme weather exposure, but there is no indication of an impact on the company.
- Reimbursement: The company discusses materialized reimbursements for a negative extreme weather impact experienced in the past, e.g., payment of hurricane costs by an insurance company.
Output Format:
Answer with a single word: "Positive", "Negative", "Neutral", or “Reimbursement”.
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_directionality.format(text=text_1)
prompt_2 = prompt_template_impact_directionality.format(text=text_2)
prompt_3 = prompt_template_impact_directionality.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)
# 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
- 6
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support