Views
No views yet
1base_model: cognitivecomputations/TinyDolphin-2.8.1-1.1b
2gate_mode: hidden
3dtype: float16
4experts:
5 - source_model: cognitivecomputations/TinyDolphin-2.8.1-1.1b
6 positive_prompts:
7 - "think step-by-step and follow these instructions"
8 - "read the following passage, and summarize it in less than 30 words."
9 - "please answer this question, consider the options carefully, and return the most likely answer."
10 - source_model: cognitivecomputations/TinyDolphin-2.8.1-1.1b
11 positive_prompts: ["produce python code"]
12 - source_model: cognitivecomputations/TinyDolphin-2.8.1-1.1b
13 positive_prompts: ["What is 2 x 22?"]1!pip install -qU transformers bitsandbytes accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "jtatman/TinyDolphin-3x-MoE"
8
9tokenizer = AutoTokenizer.from_pretrained(model)
10pipeline = transformers.pipeline(
11 "text-generation",
12 model=model,
13 model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
14)
15
16messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
17prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
18outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
19print(outputs[0]["generated_text"])