Views
No views yet
1# Use a pipeline as a high-level helper
2from transformers import pipeline
3pipe = pipeline("text-generation", model="dwightf/BerkshireGPT")
4# Load model directly
5from transformers import AutoTokenizer, AutoModelForCausalLM
6tokenizer = AutoTokenizer.from_pretrained("dwightf/BerkshireGPT")
7model = AutoModelForCausalLM.from_pretrained("dwightf/BerkshireGPT")1eval_prompt = f"""[INST]<<SYS>>\n You are a value investor giving your advice on stocks. And choosing whether to buy, sell, or hold them.
2
3 <</SYS>>
4
5
6 Q -{question}
7
8 [/INST]
9
10 """