Palmyra-Fin-70B-32K / README.md
wassemgtk's picture
Update README.md
442c093 verified
---
tags:
- instruct
- pytorch
- finance
- stock market
- candlesticks
- FinGPT
- option trading
- future stock prediction
- trends prediction
- Enterprise LLM
- Enterprise
- Enterprise ready
- Banks
- Wealth Management
model-index:
- name: Palmyra-Fin-70B-32k
results: []
license: other
license_name: writer-open-model-license
license_link: https://writer.com/legal/open-model-license/
extra_gated_prompt: >-
By clicking "Agree", you agree to the [License
Agreement](https://writer.com/legal/open-model-license/) and acknowledge
Writer's [Privacy Policy](https://writer.com/legal/acceptable-use/).
extra_gated_fields:
Name: text
Email: text
Organization or Affiliation: text
Receive email updates and promotions on Writer products, services, and research?:
type: select
options:
- 'Yes'
- 'No'
I acknowledge that this model is for non-commercial use only unless I acquire a separate license from Writer: checkbox
language:
- en
widget:
- example_title: Palmyra-Fin-70B-32k
messages:
- role: system
content: >-
You are an expert language model specialized in the financial services
domain. Your responses should be detailed, accurate, and tailored to the
needs of financial professionals. Consider ethical implications, long-term
impacts, and current global financial trends in your advice.
- role: user
content: >-
As the CFO of a technology company, we are considering issuing new equity
to fund our expansion into international markets. Could you provide a
brief analysis of the advantages and disadvantages of issuing new equity,
especially in the context of maintaining our current share price and
investor relations?
output:
text: >-
As the CFO of a technology company, considering issuing new equity to fund
expansion into international markets is a strategic decision that requires
a thorough analysis of its advantages and disadvantages. Issuing new
equity can be an effective way to raise capital, but its crucial to weigh
the benefits against the potential dilution of existing shareholders
ownership and its impact on your share price. Heres a balanced view of the
key advantages and disadvantages to help you make an informed
decision:\n\nAdvantages:\n\n1. **Capital Raising**: Issuing new equity is
an effective way to raise capital for expansion into international
markets. This capital can be used to establish a presence in new markets,
hire local teams, and develop marketing campaigns tailored to those
regions.\n\n2. **Diversified Shareholder Base**: Issuing new equity can
attract new investors, potentially including international investors. This
can help broaden your shareholder base, which may improve liquidity and
provide greater market stability.\n\n3. **Enhanced Credibility**: Issuing
new equity can be perceived by the market as a vote of confidence in your
company's growth prospects, enhancing your credibility with existing and
potential investors.\n\n4. **Strategic Partnerships**: Issuing new equity
can facilitate strategic partnerships or collaborations. For example,
issuing shares to a strategic partner in a new market can help you
establish a local presence and gain access to their customer base.\n\n5.
**Employee Incentives**: Issuing new equity can be used to incentivize
employees, especially when vesting is tied to specific performance metrics
or time-based vesting schedules. This can help attract and retain top
talent.\n\nDisadvantages:\n\n1. **Dilution of Ownership**: Issuing new
equity dilutes the ownership percentage of existing shareholders. This
dilution can cause a decrease in the share price of your company's
stock.\n\n2. **Dilution of Earnings**: Issuing new equity dilutes earnings
per share, which could cause a decrease in your company's share
price.\n\n3. **Increased Shareholder Scrutiny**: Issuing new equity may
attract new shareholders who will demand greater transparency and scrutiny
of your operations. This could increase legal and financial reporting
expenses, make some activities more time-consuming, and may also place
undue strain on your personnel.\n\n4. **Issuance Costs and Expenses**:
Issuing new equity involves significant legal, accounting, and other
expenses. These costs could include, among other things, registration
fees, filing fees, printing fees, and the compensation of any
underwriters. The total amount of these costs may be substantial.\n\n5.
**Market Volatility**: Issuing new equity can cause market volatility in
the price of your company's stock. The sale of these shares, or the
perception that sales could occur, could cause the price of your company's
stock to fall. This could also make it more difficult for you to sell
equity or debt securities in the future at a time or price that you deem
reasonable or appropriate.\n\n6. **Perception of Weakness**: The sale of
additional equity securities may lead to a perception by the market that
your company's management believes its existing capital resources will be
insufficient for its operations. This perception could cause your
company's stock price to decline.\n\n7. **Restrictions on Dividends**: If
you are incorporated in a state that limits your ability to pay dividends
on your common stock while you have preferred stock outstanding, then the
rights of the holders of your common stock may be subject to limitations
on the declaration of dividends.\n\n8. **Anti-Takeover Effects**: Issuing
new equity may have anti-takeover effects. For example, if your company
has a staggered board of directors, shares underlying new equity could be
issued by your board of directors in one or more rights plans or similar
plans. The rights will entitle all shareholders of record on a certain
date to purchase shares of preferred stock upon the occurrence of certain
events, such as a person acquiring a certain percentage of your companys
outstanding voting stock. The rights will expire prior to the
commencement of any business combination with a person who beneficially
owns 20% or more of your companys outstanding voting stock. The rights may
have the effect of entrenching your companys management team and may
deprive you of the opportunity to sell your company to potential acquirers
at a premium over prevailing prices. This potential inability to obtain a
control premium could reduce the price of your company's stock.\n\n9.
**Impact on Employee Stock Options**: Issuing new equity may cause your
companys employee stock options to become less valuable. This could
adversely affect your companys ability to attract and retain
employees.\n\n10. **Alternative Financing Options**: Depending on your
companys stage of development and market conditions, it may be possible to
obtain needed capital through alternative financing sources, such as a
second public offering, a private placement of securities, or loans from
banks or related or unrelated parties. These financing sources may have
terms favorable to your company compared to those obtained through an
issuance of new equity.\n\nIn the context of maintaining your current
share price and investor relations, it's essential to consider the
following:\n\n1. **Communicate Effectively**: It is crucial to
communicate the reasons behind issuing new equity clearly and
transparently to your existing shareholders. This can help manage
expectations and reduce potential negative perceptions.\n\n2. **Share
Price Impact**: Analyze the potential dilution of earnings per share and
the ownership percentage of existing shareholders. Consider the impact of
issuing new equity on your companys share price in the short and long
term.\n\n3. **Investor Relations**: Engage with your existing shareholders
to understand their concerns and address them proactively. This can help
maintain a positive relationship with your investor base.\n\n4. **Equity
Incentive Plans**: Ensure that your equity incentive plans are aligned
with your companys long-term goals and that vesting schedules are
structured to incentivize employees appropriately.\n\n5. **Alternative
Financing Options**: Carefully evaluate alternative financing options and
consider the potential impact of each on your share price and investor
relations.\n\nIn conclusion, issuing new equity to fund expansion into
international markets can be a viable option, but it is essential to
carefully weigh the advantages and disadvantages and consider alternative
financing options. Effective communication with your existing
shareholders is critical to managing expectations and maintaining a
positive relationship with your investor base.
base_model:
- Writer/palmyra-4-oasis
---
<div align="center">
<h1>Palmyra-Fin, a powerful LLM designed for Finance</h1>
<img src="img/Palmyra Finance wordmark.svg" width=420px />
</div>
## Model Description
- Developed by: Writer
- Language(s) (NLP): English
- Context window: 32,768 tokens
- Parameters: 70 billion
- Finetuned from model: Palmyra-X-003
- License: [Writer open model license](https://writer.com/legal/acceptable-use/)
## Model Details
Palmyra-Fin-70B-32K is a model built by Writer specifically to meet the needs of the financial industry. It is a leading LLM on financial benchmarks, outperforming other large language models in various financial tasks and evaluations.
### Resources and Technical Documentation:
+ [Writer Blog](https://writer.com/blog/palmyra-med-fin-models/)
+ [Writer Developer Website](https://dev.writer.com/home/models)
+ [Writer AI Studio](https://writer.com/product/ai-studio/)
+ [Palmyra Model API](https://dev.writer.com/api-guides/chat-completion)
## Specialized for Financial Applications
Palmyra-Fin-70B-32K is meticulously designed to meet the unique linguistic and knowledge demands of the finance and economics sectors. It has been fine-tuned on an extensive collection of high-quality financial data, ensuring it can comprehend and generate text with precise domain-specific accuracy and fluency.
Our system integrates a specialized internal finance dataset and a well-crafted fine-tuning recipe, making it highly adept at handling the specific needs of this field. Key components of our training pipeline include:
- Specialized Dataset: Utilizing a proprietary internal finance dataset to enhance the model's performance.
- Fine-tuning approach: Custom financial instruction dataset (Writer in-house build)
## Intended Use
### Intended Use Cases
Palmyra-Fin-70B-32K is intended for use in English for financial analysis, market trend prediction, risk assessment, financial report generation, and automated financial advice. It excels at answering questions from long financial documents, making it ideal for in-depth financial research and analysis.
### Out-of-scope
Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by [Writer's Acceptable Use Policy](https://writer.com/legal/acceptable-use/) and [the Writer open model license](https://writer.com/legal/acceptable-use/). Use in languages other than English.
**Note:** Users should be aware that while the model is highly capable, it should not be used as the sole basis for making significant financial decisions.
### Use with transformers
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Writer/Palmyra-Fin-70B-32K"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
attn_implementation="flash_attention_2",
)
messages = [
{
"role": "system",
"content": "You are a highly knowledgeable and experienced expert in the financial sector, possessing extensive knowledge and practical expertise in financial analysis, markets, investments, and economic principles.",
},
{
"role": "user",
"content": "Can you explain how central banks printing more money (quantitative easing) affects the stock market and how investors might react to it?",
},
]
input_ids = tokenizer.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
)
gen_conf = {
"max_new_tokens": 1024,
"eos_token_id": tokenizer.eos_token_id,
"temperature": 0.0,
"top_p": 0.9,
}
with torch.inference_mode():
output_id = model.generate(input_ids, **gen_conf)
output_text = tokenizer.decode(output_id[0][input_ids.shape[1] :])
print(output_text)
```
## Evaluation Results
Palmyra-Fin-70B-32K outperforms other models on internal finance evaluations, achieving state-of-the-art results across various financial datasets. Its strong performance in tasks like financial document analysis, market trend prediction, and risk assessment underscores its effective grasp of financial knowledge.
Key Performance Metrics:
- 100% accuracy on needle-in-haystack tasks
- Superior performance on internal finance evaluations compared to other models
Palmyra-Fin-70B-32K achieves 100% accuracy on needle-in-haystack tasks across its entire 32,768 token context window, demonstrating exceptional capability in precise information extraction from extensive financial documents.
![palmyra-fin-70b-32k-nih](img/Palmyra-Fin-70b-32k-on-NIH.png)
## CFA Level III Test
The new Palmyra-Fin-70B model passed the CFA Level III test with a 73%. It's the first model to pass this exam, often called "the world's hardest exam." The average passing score is 60%, and less than half of all test takers pass. This is a big improvement from other models like GPT-4, which scored 33% on the exam.
## Long-Fin-Eval Performance:
To further assess the model's capabilities, we developed and conducted an evaluation using long-fin-eval, an internally created benchmark designed to simulate real-world financial use cases. This evaluation consists of samples containing long documents paired with high-quality question-answer sets. The model's task is to generate responses based on the provided document and question, with the output evaluated by GPT-4 Turbo.
The long-fin-eval methodology assesses both the model's information retrieval capabilities and its ability to engage in extended dialogue on complex financial topics. This approach provides insight into the model's capacity to process and synthesize information from lengthy financial documents while maintaining coherent and contextually appropriate conversational output.
In this evaluation, Palmyra-Fin-70B-32K showed superior performance compared to both open-source and proprietary benchmark models. These results indicate the model's effectiveness in addressing real-world financial applications that require both comprehensive understanding of extensive documents and the ability to articulate nuanced insights.
| model name | long-fin-eval |
| -------------------- | -------------- |
| Palmyra-Fin-70B-32K | 9.04 |
| Claude 3.5 Sonnet | 9.02 |
| Qwen-2 70B instruct | 8.9 |
| gpt-4o | 8.72 |
| palmyra-fin-56b | 8.23 |
| mixtral-8x7b | 7.57 |
![palmyra-fin-70b-32k-performance](img/performance.png)
## Financial Use Cases
Palmyra-Fin-70B-32K excels in analyzing and summarizing complex financial reports, market data, and economic indicators, extracting key information to generate concise, structured summaries. It helps enhance financial decision-making by performing advanced entity recognition, identifying key financial concepts such as market trends, economic indicators, and financial instruments from unstructured text.
By leveraging its deep understanding of financial terminology, the model enhances information retrieval, data analysis, and knowledge discovery from financial reports, research articles, and other economic sources. These capabilities support applications like investment analysis, risk management, and financial research.
## Bias, Risks, and Limitations
Palmyra-Fin-70B-32K, despite leveraging high-quality data, may contain inaccuracies, biases, or misalignments and has not been rigorously evaluated in real-world financial settings.
It is advised not to use the model for direct financial decision-making or professional financial advice without human oversight. Instead, its use should be confined to research and analysis by qualified individuals who understand its limitations. Palmyra-Fin-70B-32K should not replace professional financial judgment, and adapting it for critical financial use would require extensive additional work, including thorough testing, regulatory compliance, bias mitigation, and human oversight. Always consult a qualified financial professional for personal financial needs.
## Citation and Related Information
To cite this model:
```
@misc{Palmyra-Fin-70B-32k,
author = {Writer Engineering team},
title = {{Palmyra-Fin-70B-32k: a powerful LLM designed for Finance}},
howpublished = {\url{https://dev.writer.com}},
year = 2024,
month = July
}
```
Contact [email protected]