Downloads · 30 days
65
4% of all-time downloads
mjmanashti/gemma-2b-ForexAI
gemma-2b-ForexAI is a text generation model from mjmanashti. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
This model was trained using AutoTrain. For more information, please visit AutoTrain.
Downloads · 30 days
65
4% of all-time downloads
All-time downloads
1.6K
Public
Parameters
2.5B
10.3 GB on disk
Likes
11
Public
Click a slice to open those files.
.safetensors10.2 GB · 98%
From the Hugging Face model README
This model was trained using AutoTrain. For more information, please visit AutoTrain.
!pip install transformers
!pip install accelerate
from huggingface_hub import notebook_login
notebook_login()
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("mjmanashti/gemma-2b-ForexAI")
torch.set_default_dtype(torch.float16)
model = AutoModelForCausalLM.from_pretrained("mjmanashti/gemma-2b-ForexAI", device_map="auto")
chat = [
{ "role": "user", "content": "Based on the following input data: [Time: 2024-01-29 23:00:00, Open: 1.0834, High: 1.0837, Low: 1.08334, Close: 1.08338, Volume: 722] what trading signal (BUY, SELL, or HOLD) should be executed to maximize profit? If the signal is BUY, what would be the entry price and If the signal is SELL, what would be the exit price for profit maximization? " },
]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=150)
print(tokenizer.decode(outputs[0]))