Downloads · 30 days
15
5% of all-time downloads
Isotonic/AdaptLLM-4x7B-MoE
AdaptLLM-4x7B-MoE is a text generation model from Isotonic. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
🌟 Buying me coffee is a direct way to show support for this project. <a href="https://www.buymeacoffee.com/isotonic"<img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" alt=""</a
Downloads · 30 days
15
5% of all-time downloads
All-time downloads
331
Public
Parameters
20.2B
40.5 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors40.5 GB · 100%
From the Hugging Face model README
🌟 Buying me coffee is a direct way to show support for this project. <a href="https://www.buymeacoffee.com/isotonic"><img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" alt=""></a>
AdaptLLM-4x7B-MoE is a Mixure of Experts (MoE) made with the following models using LazyMergekit:
Prompt Template:
<s>[INST] <<SYS>>
{{ system_prompt }}
<</SYS>>
{{ user_message }} [/INST]
!pip install -qU transformers bitsandbytes accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "Isotonic/AdaptLLM-4x7B-MoE"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
model_kwargs={
"torch_dtype": torch.float16,
"low_cpu_mem_usage": True,
"use_cache" : False,
"gradient_checkpointing" : True,
"device_map" : 'auto',
"load_in_8bit" : True
},
)
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipeline(prompt, max_new_tokens=512, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
base_model: mlabonne/NeuralBeagle14-7B
experts:
- source_model: mlabonne/NeuralBeagle14-7B
positive_prompts:
- "chat"
- "assistant"
- "tell me"
- "explain"
- "storywriting"
- "write"
- "scene"
- "story"
- "character"
- "instruct"
- "summarize"
- "count"
- source_model: AdaptLLM/finance-chat
positive_prompts:
- "personal finance"
- "budgeting"
- "investing"
- "retirement planning"
- "debt management"
- "financial education"
- "consumer protection"
- "financial"
- "money"
- "investment"
- "banking"
- "stock"
- "bond"
- "portfolio"
- "risk"
- "return"
- source_model: AdaptLLM/medicine-chat
positive_prompts:
- "diagnose"
- "treat"
- "disease"
- "symptom"
- "medication"
- "anatomy"
- "physiology"
- "pharmacology"
- "clinical trial"
- "medical research"
- source_model: AdaptLLM/law-chat
positive_prompts:
- "law"
- "legal"
- "attorney"
- "lawyer"
- "court"
- "contract"
- "criminal"
- "evidence"
- "procedure"
- "contracts"
- "mergers & acquisitions"
- "corporate governance"
- "intellectual property"
- "employment law"
- "international trade"
- "competition law"
- "antitrust"
- "litigation"
- "arbitration"
- "mediation"