Qwen2.5-1.5B-pfn-qfin

Model Description

Qwen2.5-1.5B-pfn-qfin is an fine-tuned model based on Qwen/Qwen2.5-1.5B. This is the base model, which is good at generating continuous sentences. Qwen2.5-1.5B-pfn-qfin is fine-tuned on about 400M tokens from multiple special datasets generated by Preferred Networks, which is clear to use for commercial usage. The fine-tuned were carried out at a 2048 context length. This model is released under PLaMo Community License.

Benchmarking

The benchmark score is obtained using Japanese Language Model Financial Evaluation Harness For the benchmark, 0-shot and default prompts are used.

Task Metric Qwen2.5-1.5B Ours
chabsa f1 0.7269 0.7578
cma_basics acc 0.3684 0.3947
cpa_audit acc 0.1382 0.2111
fp2 acc 0.4035 0.4386
security_sales_1 acc 0.2463 0.2421
---------------- ------ ------ ------
OVER ALL 0.3767 0.4089

Usage

Install the required libraries as follows:

>>> python -m pip install "transformers>=4.37.0"

Execute the following python code:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("pfnet/Qwen2.5-1.5B-pfn-qfin", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("pfnet/Qwen2.5-1.5B-pfn-qfin", device_map="auto", trust_remote_code=True)
text = "日本銀行は"
input_ids = tokenizer(text, return_tensors="pt").input_ids
with torch.no_grad():
  generated_tokens = model.generate(
      inputs=input_ids.to(model.device),
      max_new_tokens=32,
      do_sample=True,
      top_k=50,
      top_p=0.95,
      temperature=1.0,
      pad_token_id=tokenizer.pad_token_id,
      bos_token_id=tokenizer.bos_token_id,
      eos_token_id=tokenizer.eos_token_id
  )[0]
generated_text = tokenizer.decode(generated_tokens)
print(generated_text)

Bias, Risks, and Limitations

Qwen2.5-1.5B-pfn-qfin is a new technology that carries risks with use. Testing conducted to date has been in English and Japanese, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Qwen2.5-1.5B-pfn-qfin’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. This model is not designed for legal, tax, investment, financial, or other advice. Therefore, before deploying any applications of Qwen2.5-1.5B-pfn-qfin, developers should perform safety testing and tuning tailored to their specific applications of the model.

Authors

Preferred Networks, Inc.

  • Masanori Hirano
  • Kentaro Imajo
  • Takeshi Masuko

License

PLaMo Community License

Downloads last month
4
Safetensors
Model size
1.54B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for pfnet/Qwen2.5-1.5B-pfn-qfin

Base model

Qwen/Qwen2.5-1.5B
Finetuned
(151)
this model