Downloads · 30 days
0
tahamajs/llama-3.2-3b-instruct-bitcoin-analyst
llama-3.2-3b-instruct-bitcoin-analyst is a text generation model from tahamajs. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This model, tahamajs/llama-3.2-3b-instruct-bitcoin-analystbest, is a fine-tuned version of Llama-3.2-3B-Instruct, a large language model. It has been specialized for Bitcoin analysis and cryptocurrency-related questio…
Downloads · 30 days
0
Access
Public
Updated Aug 8, 2025
Repo size
5.9 GB
Likes
0
Public
Click a slice to open those files.
.pt3.9 GB · 62%
From the Hugging Face model README
This model, tahamajs/llama-3.2-3b-instruct-bitcoin-analyst_best, is a fine-tuned version of Llama-3.2-3B-Instruct, a large language model. It has been specialized for Bitcoin analysis and cryptocurrency-related questions. The fine-tuning process, using QLoRA, aimed to improve the model's ability to provide accurate and contextually relevant information, effectively acting as a virtual Bitcoin analyst.
To use this model, you can load the fine-tuned adapter weights on top of the base model. This approach is memory-efficient as it only loads the small LoRA adapter weights, not the entire base model.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
# Define the model IDs
base_model_id = "meta-llama/Llama-3.2-3B-Instruct"
peft_model_id = "tahamajs/llama-3.2-3b-instruct-bitcoin-analyst_best"
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# Load the base model with 4-bit quantization
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
quantization_config=bnb_config,
device_map="auto"
)
# Load the fine-tuned PEFT adapter
model = PeftModel.from_pretrained(base_model, peft_model_id)
# Example inference
prompt = "What is the Bitcoin halving and how does it affect the price?"
messages = [
{"role": "user", "content": prompt}
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(input_ids=input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This section summarizes the fine-tuning process.
meta-llama/Llama-3.2-3B-Instructtahamajs/bitcoin-llm-finetuning-datasettrl.SFTTrainer with a custom data collatorq_proj, k_proj, v_proj, o_proj, gate_projThe following hyperparameters were used for fine-tuning:
| Hyperparameter | Value |
|---|---|
num_train_epochs | 1 |
per_device_train_batch_size | 1 |
gradient_accumulation_steps | 2 |
learning_rate | 2e-5 |
optim | paged_adamw_32bit |
r (LoRA rank) | 32 |
lora_alpha | 32 |
As a model fine-tuned on a specific dataset, it may have limitations:
This model is licensed under the Apache 2.0 license, inherited from its base model.
A video about getting started with generative text and fine-tuning LLMs with Hugging Face is available here. http://googleusercontent.com/youtube_content/2