Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| FinguAI-Chat-v1.Q2_K.gguf | Q2_K | 0.23GB |
| FinguAI-Chat-v1.Q3_K_S.gguf | Q3_K_S | 0.25GB |
| FinguAI-Chat-v1.Q3_K.gguf | Q3_K | 0.26GB |
| FinguAI-Chat-v1.Q3_K_M.gguf | Q3_K_M | 0.26GB |
| FinguAI-Chat-v1.Q3_K_L.gguf | Q3_K_L | 0.28GB |
| FinguAI-Chat-v1.IQ4_XS.gguf | IQ4_XS | 0.28GB |
| FinguAI-Chat-v1.Q4_0.gguf | Q4_0 | 0.29GB |
| FinguAI-Chat-v1.IQ4_NL.gguf | IQ4_NL | 0.29GB |
| FinguAI-Chat-v1.Q4_K_S.gguf | Q4_K_S | 0.29GB |
| FinguAI-Chat-v1.Q4_K.gguf | Q4_K | 0.3GB |
| FinguAI-Chat-v1.Q4_K_M.gguf | Q4_K_M | 0.3GB |
| FinguAI-Chat-v1.Q4_1.gguf | Q4_1 | 0.3GB |
| FinguAI-Chat-v1.Q5_0.gguf | Q5_0 | 0.32GB |
| FinguAI-Chat-v1.Q5_K_S.gguf | Q5_K_S | 0.32GB |
| FinguAI-Chat-v1.Q5_K.gguf | Q5_K | 0.33GB |
| FinguAI-Chat-v1.Q5_K_M.gguf | Q5_K_M | 0.33GB |
| FinguAI-Chat-v1.Q5_1.gguf | Q5_1 | 0.34GB |
| FinguAI-Chat-v1.Q6_K.gguf | Q6_K | 0.36GB |
| FinguAI-Chat-v1.Q8_0.gguf | Q8_0 | 0.47GB |
1#!pip install 'transformers>=4.39.0'
2#!pip install -U flash-attn
3#!pip install -q -U git+https://github.com/huggingface/accelerate.
4
5import torch
6from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig,TextStreamer
7
8
9model_id = 'FINGU-AI/FinguAI-Chat-v1'
10model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="flash_attention_2", torch_dtype= torch.bfloat16)
11tokenizer = AutoTokenizer.from_pretrained(model_id)
12streamer = TextStreamer(tokenizer)
13model.to('cuda')
14
15
16
17messages = [
18 {"role": "system","content": " you are as a finance specialist, help the user and provide accurat information."},
19 {"role": "user", "content": " what are the best approch to prevent loss?"},
20 ]
21tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
22
23generation_params = {
24 'max_new_tokens': 1000,
25 'use_cache': True,
26 'do_sample': True,
27 'temperature': 0.7,
28 'top_p': 0.9,
29 'top_k': 50,
30 'eos_token_id': tokenizer.eos_token_id,
31}
32
33outputs = model.generate(tokenized_chat, **generation_params, streamer=streamer)
34decoded_outputs = tokenizer.batch_decode(outputs)
35
36'''
37To avoid losses, it's essential to maintain discipline, set realistic goals, and adhere to predetermined rules for trading.
38Diversification is key as it spreads investments across different sectors and asset classes to reduce overall risk.
39Regularly reviewing and rebalancing positions can also ensure alignment with investment objectives. Additionally,
40staying informed about market trends and economic indicators can provide opportunities for long-term capital preservation.
41It's also important to stay patient and avoid emotional decision-making, as emotions often cloud judgment.
42If you encounter significant losses, consider using stop-loss orders to limit your losses.
43Staying disciplined and focusing on long-term objectives can help protect your investment portfolio from permanent damage.
44'''