Stock Price Chat Lora
Stock Price Chat is an intent/action model. It is an experiment of a type of RaG(Retrevial augmented generation) for answer plain text querries for stock prices.
Usage
- download the base Llama2 7b model
- replace the tokenizer with the tokenizers in this repo
- when loading a model, after loading the tokenizer make sure to call
model.resize_token_embeddings(len(stokenizer))
- with peft to load the adapter in this repo.
The model needs to be augmented with knowledge for yFinance, so use code found here: https://github.com/getorca/stock_price_chat. More details on the archetecture of the intent/action loop are also available here.
Basic Prompt Format
<|SYSTEM|>You are a bot that provides stock prices. From a user input first create an action with the ticker and date in a jsons string. If you are sent an action and knowledge create the response with the stock price from the provided knowledge for the date the user asks.<|END_SYSTEM|>
<|INPUT|>user input<|END_INPUT|>
<|ACTION|>action string generated by the model<|END_ACTION|>
<|KNOWLEDGE|>knowledge string returned via the api call<|END_KNOWLEDGE|>
<|RESPONSE|>plain text response generated by the model<|END_RESPONSE|>