Model Card for Llama-3.2-3B-Instruct-Bitcoin-Analyst-v2
This repository contains a specialized version of meta-llama/Llama-3.2-3B-Instruct, expertly fine-tuned to function as a Bitcoin and cryptocurrency market analyst. The model is the result of a multi-stage "continuation training" process, making it highly capable of understanding and responding to complex instructions in the financial domain.
Model Details
Model Description
This model is a Causal Language Model (CLM) based on the Llama 3.2 3B Instruct architecture. It was developed through a sequential fine-tuning process to enhance its knowledge and instruction-following capabilities for topics related to Bitcoin, blockchain technology, and financial markets.
The training procedure involved two main stages:
Initial Specialization: The base model was first merged with a high-performing LoRA adapter (tahamajs/llama-3.2-3b-instruct-bitcoin-analyst-perfect) to provide a strong foundation of domain-specific knowledge.
Continuation Training: A new LoRA adapter was then trained on top of this already-specialized model using the tahamajs/bitcoin-llm-finetuning-dataset.
Final Merge: The final model available here is the result of merging the second adapter, combining the knowledge from all stages into a single, powerful model.
Developed by: tahamajs
Model type: Causal Language Model, Instruction-Tuned
Language(s) (NLP): English (en)
License: Llama 3 Community License Agreement
Finetuned from model:meta-llama/Llama-3.2-3B-Instruct
This model is intended for direct use as an instruction-following chatbot for topics related to Bitcoin and cryptocurrency. It can be used for question answering, analysis, and explanation of complex financial and technical concepts. For best results, prompts should be formatted using the Llama 3 chat template.
Out-of-Scope Use
This model is not a financial advisor. It should not be used for making investment decisions. The model's knowledge is limited to its training data and it may produce inaccurate or outdated information. It is not designed for general-purpose conversation outside of its specialized domain.
Bias, Risks, and Limitations
This model inherits the limitations of the base Llama 3.2 model and the biases present in its training data. In the financial domain, there is a risk of generating overly optimistic or pessimistic statements that could be misinterpreted as financial advice. Users should be aware of these risks and verify any factual information independently.
Recommendations
Users should critically evaluate all outputs from this model, especially when they pertain to financial metrics or price predictions. We recommend clearly stating to any end-users that the text is generated by an AI and is not a substitute for professional financial advice.
How to Get Started with the Model
Use the code below to load and run the model using the transformers library.
python
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
34# Use the ID of this repository5model_id ="tahamajs/llama-3.2-3b-instruct-bitcoin-analyst-perfect_v2"67# Load the tokenizer and model8tokenizer = AutoTokenizer.from_pretrained(model_id)9model = AutoModelForCausalLM.from_pretrained(10 model_id,11 torch_dtype=torch.bfloat16,12 device_map="auto",13)1415# Use the Llama 3 chat template for instruction-following16messages =[17{"role":"user","content":"What is the Bitcoin halving and what is its expected impact on the price?"},18]1920# Apply the chat template and tokenize21input_ids = tokenizer.apply_chat_template(22 messages,23 add_generation_prompt=True,24 return_tensors="pt"25).to(model.device)2627# Generate a response28outputs = model.generate(29 input_ids,30 max_new_tokens=512,31 do_sample=True,32 temperature=0.6,33 top_p=0.9,34)3536# Decode and print the output37response = outputs[0][input_ids.shape[-1]:]38print(tokenizer.decode(response, skip_special_tokens=True))
Training Details
Training Data
The second stage of fine-tuning was performed on the tahamajs/bitcoin-llm-finetuning-dataset. This dataset contains instruction-response pairs related to Bitcoin, market analysis, and blockchain technology.
Training Procedure
Preprocessing
The training data was formatted into the Llama 3 chat template using the following structure for each example: