1gate_mode: hidden
2dtype: bfloat16
3experts:
4 - source_model: epfl-llm/meditron-7b
5 positive_prompts:
6 - "What are the latest guidelines for managing type 2 diabetes?"
7 - "Best practices for post-operative care in cardiac surgery are"
8 negative_prompts:
9 - "What are the environmental impacts of deforestation?"
10 - "The recent advancements in artificial intelligence have led to developments in"
11 - source_model: medalpaca/medalpaca-7b
12 positive_prompts:
13 - "When discussing diabetes management, the key factors to consider are"
14 - "The differential diagnosis for a headache with visual aura could include"
15 negative_prompts:
16 - "Recommend a good recipe for a vegetarian lasagna."
17 - "The fundamental concepts in economics include ideas like supply and demand, which explain"
18 - source_model: chaoyi-wu/PMC_LLAMA_7B_10_epoch
19 positive_prompts:
20 - "How would you explain the importance of hypertension management to a patient?"
21 - "Describe the recovery process after knee replacement surgery in layman's terms."
22 negative_prompts:
23 - "Recommend a good recipe for a vegetarian lasagna."
24 - "The recent advancements in artificial intelligence have led to developments in"
25 - "The fundamental concepts in economics include ideas like supply and demand, which explain"
26 - source_model: allenai/tulu-2-dpo-7b
27 positive_prompts:
28 - "Here is a funny joke for you -"
29 - "When considering the ethical implications of artificial intelligence, one must take into account"
30 - "In strategic planning, a company must analyze its strengths and weaknesses, which involves"
31 - "Understanding consumer behavior in marketing requires considering factors like"
32 - "The debate on climate change solutions hinges on arguments that"
33 negative_prompts:
34 - "In discussing dietary adjustments for managing hypertension, it's crucial to emphasize"
35 - "For early detection of melanoma, dermatologists recommend that patients regularly check their skin for"
36 - "Explaining the importance of vaccination, a healthcare professional should highlight"
37
1!pip install -qU transformers bitsandbytes accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "Technoculture/Mediquad-tulu-20B"
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"])