랭킹으로 돌아가기

databricks/dbrx

Pythondatabricks.com

Code examples and resources for DBRX, a large language model developed by Databricks

databricksgen-aigenerative-aillmllm-inferencellm-trainingmosaic-ai
스타 성장
스타
2.5k
포크
244
주간 성장
이슈
11
2k2.5k
2024년 3월2024년 9월2025년 4월2025년 11월
아티팩트PyPIpip install dbrx
README

DBRX

DBRX is a large language model trained by Databricks, and made available under an open license. This repository contains the minimal code and examples to run inference, as well as a collection of resources and links for using DBRX.

A reference model code can be found in this repository at modeling_dbrx.py.

Note: this model code is supplied for references purposes only, please see the Hugging Face repository for the official supported version.

Model details

DBRX is a Mixture-of-Experts (MoE) model with 132B total parameters and 36B live parameters. We use 16 experts, of which 4 are active during training or inference. DBRX was pre-trained for 12T tokens of text. DBRX has a context length of 32K tokens.

The following models are open-sourced:

Model Description
DBRX Base Pre-trained base model
DBRX Instruct Finetuned model for instruction following

The model was trained using optimized versions of our open source libraries Composer, LLM Foundry, MegaBlocks and Streaming.

For the instruct model, we used the ChatML format. Please see the DBRX Instruct model card for more information on this.

Quick start

To download the weights and tokenizer, please first visit the DBRX Hugging Face page and accept the license. Note: access to the Base model requires manual approval.

We recommend having at least 320GB of memory to run the model.

Then, run:

pip install -r requirements.txt # Or requirements-gpu.txt to use flash attention on GPU(s)
huggingface-cli login           # Add your Hugging Face token in order to access the model
python generate.py              # See generate.py to change the prompt and other settings

For more advanced usage, please see LLM Foundry (chat script, batch generation script)

If you have any package installation issues, we recommend using our Docker image: mosaicml/llm-foundry:2.2.1_cu121_flash2-latest

Inference

Both TensorRT-LLM and vLLM can be used to run optimized inference with DBRX. We have tested both libraries on NVIDIA A100 and H100 systems. To run inference with 16-bit precision, a minimum of 4 x 80GB multi-GPU system is required.

TensorRT-LLM

DBRX support is being added to TensorRT-LLM library: Pending PR

After merging, instructions to build and run DBRX TensorRT engines will be found at: README

vLLM

Please see the vLLM docs for instructions on how to run DBRX with the vLLM engine.

MLX

If you have an Apple laptop with a sufficiently powerful M-series chip, quantized version of DBRX can be run with MLX. See instructions for running DBRX on MLX here.

LLama.cpp

If you have an Apple M-series chip laptop with atleast 64GB RAM, you can run a quantized version of DBRX using llama.cpp.

  1. Compile llama.cpp
  2. Download a quantized ggml version of dbrx-instruct such as dranger003/dbrx-instruct-iMat.GGUF
  3. From llama.cpp folder, run:
./main -ngl 41 -m ./models/ggml-dbrx-instruct-16x12b-iq1_s.gguf -n 256 --repeat_penalty 1.0 --color -i -r "User:" -f prompts/chat-with-bob.txt

Finetune

To finetune DBRX with our open source library LLM Foundry, please see the instructions in our training script (found here). We have finetuning support for both:

Note: LoRA support currently cannot finetune the experts, since the experts are fused. Stay tuned for more.

Model card

The model cards can be found at:

Integrations

DBRX is available on the Databricks platform through:

Other providers have recently added support for DBRX:

The same tools used to train high quality MoE models such as DBRX are available for Databricks customers. Please reach out to us at https://www.databricks.com/company/contact if you are interested in pre-training, finetuning, or deploying your own DBRX models!

Issues

For issues with model output, or community discussion, please use the Hugging Face community forum (instruct, base)

For issues with LLM Foundry, or any of the underlying training libraries, please open an issue on the relevant GitHub repository.

License

Our model weights and code are licensed for both researchers and commercial entities. The Databricks Open Source License can be found at LICENSE, and our Acceptable Use Policy can be found here.

관련 저장소
dbeaver/dbeaver

Free universal database tool and SQL client

JavaMavenApache License 2.0sqldatabase
dbeaver.io
51.1k4.3k
getredash/redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.

PythonPyPIBSD 2-Clause "Simplified" Licenseredashpython
redash.io
28.7k4.6k
cube-js/cube

📊 Cube Core is open-source semantic layer for AI, BI and embedded analytics

Rustcrates.ioOtheranalyticscube
cube.dev
20.5k2.1k
Tencent/APIJSON

🏆 Real-Time no-code, powerful and secure ORM 🚀 providing APIs and Docs without coding by Backend, and Frontend(Client) can customize response JSONs 🏆 实时 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构

JavaMavenOtherpostgresql-databasetidb
apijson.cn
18.4k2.3k
databrickslabs/dolly

Databricks’ Dolly, a large language model trained on the Databricks Machine Learning Platform

PythonPyPIApache License 2.0databricksgpt
databricks.com/blog/2023/03/24/hello-dolly-democratizing-magic-chatgpt-open-models.html
10.8k1.1k
tobymao/sqlglot

Python SQL Parser and Transpiler

PythonPyPIMIT Licensetranspilersql
sqlglot.com
9.4k1.2k
growthbook/growthbook

Open Source Feature Flags, Experimentation, and Product Analytics

TypeScriptnpmOtherabtestingstatistics
growthbook.io
8k796
microsoft/SynapseML

Simple and Distributed Machine Learning

ScalaMIT Licensesparkpyspark
aka.ms/spark
5.2k863
delta-io/delta-rs

A native Rust library for Delta Lake, with bindings into Python

Rustcrates.ioApache License 2.0deltarust
delta-io.github.io/delta-rs/
3.3k638
dotnet/spark

.NET for Apache® Spark™ makes Apache Spark™ easily accessible to .NET developers.

C#MIT Licensesparkcsharp
dot.net/spark
2.1k332
databricks-solutions/ai-dev-kit

Databricks Toolkit for Coding Agents provided by Field Engineering

PythonPyPIOtheragentsclaude
1.8k395
Multiwoven/multiwoven

🔥🔥🔥 Open source Reverse ETL - alternative to hightouch and census.

RubyRubyGemsGNU Affero General Public License v3.0data-engineeringreverse-etl
aisquared.ai/enterprise/
1.7k92