tinyllama-merged-2

tinyllama-merged-2 is a merge of the following models using LazyMergekit:

🧩 Configuration

models:
  - model: bigcode/starcoder2-3b
    # no parameters necessary for base model
  - model: TechxGenus/starcoder2-3b-instruct # follow user intent 
    parameters:
      density: 1
      weight:
      - filter: mlp.down_proj
        value: [0.3, 0.25, 0.25, 0.15, 0.1]
      - filter: mlp.gate_proj
        value: [0.7, 0.25, 0.5, 0.45, 0.4]
      - filter: mlp.up_proj
        value: [0.7, 0.25, 0.5, 0.45, 0.4]
      - filter: self_attn
        value: [0.7, 0.25, 0.5, 0.45, 0.4]
      - value: 1 # fallback for rest of tensors.
tokenizer_source: union
merge_method: dare_ties
base_model: bigcode/starcoder2-3b
parameters:
  normalize: true
  int8_mask: true
dtype: bfloat16

πŸ’» Usage

!pip install -qU transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "choprahetarth/tinyllama-merged-2"
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
10
Safetensors
Model size
3.18B params
Tensor type
BF16
Β·
Inference API
Unable to determine this model's library. Check the docs .

Model tree for choprahetarth/tinyllama-merged-2

Finetuned
(3)
this model