MT-SLM-7B

MT-SLM-7B is a mixture of experts model,a well-rounded AI capable of handling diverse tasks. It excels in coding, mathematical problem-solving, storytelling, and general-purpose chat interactions.

🧩 Components

MT-SLM-7B consists of four experts:

  1. Mathematics Expert
    Finetuned for mathematical reasoning and problem-solving.

  2. Coding Expert
    Finetuned for generating high-quality Python and general programming code.

  3. Chat Expert
    A general-purpose conversational AI for everyday interactions.

  4. Storytelling Expert
    Finetuned for generating creative and engaging stories.

πŸ› οΈ Model Configuration

This model supports an 8k context window for extended interactions.

πŸš€ Usage

1. Install Dependencies

Install the required libraries using pip:

pip install -qU transformers accelerate

2. Load the Model and Generate Text

Below is an example Python script to load the model and generate text:

from transformers import AutoTokenizer
import transformers
import torch

# Specify the model name
model = "ZAIR-X/MT-SLM-7B"

# Define your conversation as a list of messages
messages = [{"role": "user", "content": "What is a large language model?"}]

# Initialize the tokenizer and prepare the prompt
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

# Set up the text generation pipeline
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    torch_dtype=torch.float16,
    device_map="auto",
)

# Generate text output
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"])

3. Example Use Cases

  • Article Explanation: Summarize and explain complex articles.
  • Coding Assistance: Generate, debug, and explain Python code.
  • Mathematical Problem Solving: Handle computations and logical reasoning.
  • Creative Storytelling: Craft engaging narratives and role-play scenarios.

🎯 Conclusion

MT-SLM-7B is a powerful, well-rounded assistant that leverages a mixture of expert models to deliver exceptional performance across various domains. Whether you need a reliable coding companion, a math tutor, or a creative storyteller, this model is designed to meet your needs. Try it out and experience the full range of its capabilities!

Happy generating! πŸš€

Downloads last month
8
Safetensors
Model size
7.24B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ZAIR-X/MT-SLM-7B

Finetuned
(1)
this model