Files
DevPearl-2x7B/README.md
ModelHub XC 71442e79bf 初始化项目,由ModelHub XC社区提供模型
Model: louisbrulenaudet/DevPearl-2x7B
Source: Original Platform
2026-06-28 03:32:12 +08:00

2.7 KiB

license, tags, base_model, language, library_name, pipeline_tag
license tags base_model language library_name pipeline_tag
cc-by-sa-4.0
moe
merge
mergekit
lazymergekit
deepseek-ai/deepseek-coder-6.7b-instruct
defog/sqlcoder-7b-2
Python
Javascript
sql
deepseek-ai/deepseek-coder-6.7b-instruct
defog/sqlcoder-7b-2
en
transformers text-generation

DevPearl-2x7B, an xtraordinary Mixture of Experts (MoE) for development

DevPearl-2x7B is a Mixture of Experts (MoE) made with the following models :

A Mixture of Experts (MoE) model represents a sophisticated architecture that amalgamates the capabilities of multiple specialized models to address a wide array of tasks within a unified framework. Within the realm of a MoE model tailored for a chat application, the integration of expertise spanning three distinct domains - chat, code, and mathematics - substantially enhances its capacity to furnish nuanced and precise responses to a diverse spectrum of user inquiries.

Configuration

base_model: codellama/CodeLlama-7b-Instruct-hf
experts:
  - source_model: deepseek-ai/deepseek-coder-6.7b-instruct
    positive_prompts:
      - "python"
      - "javascript"
      - "java"
  - source_model: defog/sqlcoder-7b-2
    positive_prompts:
      - "SQL"

Usage

!pip install -qU transformers bitsandbytes accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "louisbrulenaudet/DevPearl-2x7B"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": 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=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])

Citing & Authors

If you use this code in your research, please use the following BibTeX entry.

@misc{louisbrulenaudet2023,
  author =       {Louis Brulé Naudet},
  title =        {DevPearl-2x7B, an xtraordinary Mixture of Experts (MoE) for development},
  year =         {2024}
  howpublished = {\url{https://huggingface.co/louisbrulenaudet/DevPearl-2x7B}},
}

Feedback

If you have any feedback, please reach out at louisbrulenaudet@icloud.com.