L3-ColdBrew-Hades
L3-ColdBrew-Hades is a merge of the following models using LazyMergekit:
- SvalTek/L3-ColdBrew-Astrid
- SvalTek/L3-ColdBrew-Astrid
- SvalTek/L3-ColdBrew-Astrid
- SvalTek/L3-ColdBrew-Astrid
- SvalTek/L3-ColdBrew-Astrid
π§© Configuration
# Use: mergekit-yaml --clone-tensors ./llama-3-attenuated.yaml ./llama-3-attenuated
# See: https://github.com/arcee-ai/mergekit/issues/198 for discussion/reasoning behind this idea.
# ---
# The scale factor to use, eg: solve x^2 = 1/2 --> x = 1/sqrt(2) β 0.7071067812
const_tag: &scale_factor 0.7071067812 # 1/sqrt(2)
# The filter parameters of a scaled block.
attenuate-env: &attenuated_env
parameters:
scale:
- filter: q_proj
value: *scale_factor
- filter: k_proj
value: *scale_factor
- value: 1.0
# ---
slices:
- sources:
- model: SvalTek/L3-ColdBrew-Astrid
layer_range: [0, 8] # The first 8 layers of Block 1 are not duplicated
- sources:
- model: SvalTek/L3-ColdBrew-Astrid
layer_range: [8, 16] # The last 8 layers of Block 1 are are duplicated twice
<<: *attenuated_env
- sources:
- model: SvalTek/L3-ColdBrew-Astrid
layer_range: [8, 24] # All the layers of Block 2 are are duplicated twice
<<: *attenuated_env
- sources:
- model: SvalTek/L3-ColdBrew-Astrid
layer_range: [16, 24] # The first 8 layers of Block 3 are are duplicated twice
<<: *attenuated_env
- sources:
- model: SvalTek/L3-ColdBrew-Astrid
layer_range: [24, 32] # The last 8 layers of Block 3 are not duplicated
merge_method: passthrough
dtype: bfloat16
π» Usage
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "SvalTek/L3-ColdBrew-Hades"
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"])
- Downloads last month
- 7
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for SvalTek/L3-ColdBrew-Hades
Base model
SvalTek/L3-ColdBrew-Astrid