Downloads · 30 days
15
8% of all-time downloads
frost19k/dolphin-2.8-mistral-9b-v02-code-ft
dolphin-2.8-mistral-9b-v02-code-ft is a text generation model from frost19k. Use it when you need the model to write or continue text. It is set up for transformers.
dolphin-2.8-mistral-9b-v02-code-ft is a merge of the following models using LazyMergekit: cognitivecomputations/dolphin-2.8-mistral-7b-v02 Nondzu/Mistral-7B-Instruct-v0.2-code-ft
Downloads · 30 days
15
8% of all-time downloads
All-time downloads
182
Public
Parameters
9B
38.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors39.4 GB · 100%
From the Hugging Face model README
dolphin-2.8-mistral-9b-v02-code-ft is a merge of the following models using LazyMergekit:
slices:
- sources:
- model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
layer_range: [0, 8]
- sources:
- model: Nondzu/Mistral-7B-Instruct-v0.2-code-ft
layer_range: [6, 14]
- sources:
- model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
layer_range: [12, 20]
- sources:
- model: Nondzu/Mistral-7B-Instruct-v0.2-code-ft
layer_range: [18, 26]
- sources:
- model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
layer_range: [24, 32]
merge_method: passthrough
base_model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
dtype: float16
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "frost19k/dolphin-2.8-mistral-9b-v02-code-ft"
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"])