Downloads · 30 days
13
15% of all-time downloads
jomangbp/seldonium-3b
seldonium-3b is a text generation model from jomangbp. Use it when you need the model to write or continue text. It is set up for transformers.
Seldonium-3b is a model that combines two existing models, rhysjones/phi-2-orange and cognitivecomputations/dolphin-26-phi-2. This fusion is made possible through a Colab called "LazyMergekit", which uses the Mergekit…
Downloads · 30 days
13
15% of all-time downloads
All-time downloads
89
Public
Parameters
2.8B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.6 GB · 100%
From the Hugging Face model README
Seldonium-3b is a model that combines two existing models, rhysjones/phi-2-orange and cognitivecomputations/dolphin-2_6-phi-2. This fusion is made possible through a Colab called "LazyMergekit", which uses the Mergekit library to mix large language models (LLM). The fusion method employed in this case is "Linear", which utilizes a weighted average to combine the models. By adjusting the weight parameter, users have precise control over the contribution of each model's features to the final generated model. The fusion process involves intelligently integrating the weights and parameters of the individual models to create a new model that capitalizes on the strengths and capabilities of the original models.
models:
- model: rhysjones/phi-2-orange
parameters:
weight: 1.0
- model: cognitivecomputations/dolphin-2_6-phi-2
parameters:
weight: 0.8
merge_method: linear
dtype: float16
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "jomangbp/seldonium-3b"
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"])