Clinical Camel demonstrates competitive performance on medical benchmarks.
1base_model: microsoft/Orca-2-7b
2gate_mode: hidden
3dtype: bfloat16
4experts:
5 - source_model: AdaptLLM/medicine-chat
6 positive_prompts:
7 - "How does sleep affect cardiovascular health?"
8 - "Could a plant-based diet improve arthritis symptoms?"
9 - "A patient comes in with symptoms of dizziness and nausea"
10 - "When discussing diabetes management, the key factors to consider are"
11 - "The differential diagnosis for a headache with visual aura could include"
12 negative_prompts:
13 - "Recommend a good recipe for a vegetarian lasagna."
14 - "Give an overview of the French Revolution."
15 - "Explain how a digital camera captures an image."
16 - "What are the environmental impacts of deforestation?"
17 - "The recent advancements in artificial intelligence have led to developments in"
18 - "The fundamental concepts in economics include ideas like supply and demand, which explain"
19 - source_model: microsoft/Orca-2-7b
20 positive_prompts:
21 - "Here is a funny joke for you -"
22 - "When considering the ethical implications of artificial intelligence, one must take into account"
23 - "In strategic planning, a company must analyze its strengths and weaknesses, which involves"
24 - "Understanding consumer behavior in marketing requires considering factors like"
25 - "The debate on climate change solutions hinges on arguments that"
26 negative_prompts:
27 - "In discussing dietary adjustments for managing hypertension, it's crucial to emphasize"
28 - "For early detection of melanoma, dermatologists recommend that patients regularly check their skin for"
29 - "Explaining the importance of vaccination, a healthcare professional should highlight"
1!pip install -qU transformers bitsandbytes accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "Technoculture/Medchator-2x7b"
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"])