Downloads · 30 days
22
4% of all-time downloads
Guilherme34/Firefly-V2
Firefly-V2 is a text generation model from Guilherme34. Use it when you need the model to write or continue text. It is set up for transformers.
Firefly-V2 is a merge of the following models using LazyMergekit: Guilherme34/Firefly SicariusSicariiStuff/ImpishLLAMA3B
Downloads · 30 days
22
4% of all-time downloads
All-time downloads
539
Public
Parameters
3.2B
6.4 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors6.4 GB · 100%
From the Hugging Face model README
Firefly-V2 is a merge of the following models using LazyMergekit:
models:
- model: Guilherme34/Firefly
parameters:
weight: 1.0
- model: SicariusSicariiStuff/Impish_LLAMA_3B
parameters:
weight: 0.2
merge_method: task_arithmetic
base_model: Guilherme34/Firefly
dtype: bfloat16
parameters:
normalize: true
int8_mask: true
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "Guilherme34/Firefly-V2"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])