QRe Llama 3 8B Instruct - QDistill

This is a hybrid Mamba-Transformer model based on the Llama 3.1 architecture, distilled from Llama 3.3 70B into a 8B parameter model using Qwerky's proprietary distillation method. The model uses MAMBA layers interleaved with attention layers for efficient sequence modeling. The results are a 8B parameter model comparable in quality to Llama's 3.1 8B but running at speeds as fast or faster than Llama's 3.2 3B model.

Requirements

  • CUDA-compatible GPU
  • Python 3.8+
  • PyTorch 2.0+
  • transformers, safetensors, mamba-ssm, causal-conv1d, flash-attn

Installation

pip install transformers torch safetensors
pip install flash-attn mamba-ssm causal-conv1d --no-build-isolation

Usage - Transformers

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("QwerkyAI/QRe-Llama-3-8B-Instruct-QDistill")
model = AutoModelForCausalLM.from_pretrained(
    "QwerkyAI/QRe-Llama-3-8B-Instruct-QDistill",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)

inputs = tokenizer("Hello, how are you?", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0]))

Usage - vLLM

pip install vllm qwerky-vllm-models
vllm serve QwerkyAI/QRe-Llama-3-8B-Instruct-QDistill

Model Files

  • config.json - Model configuration with auto_map
  • modeling_qwerky_llama_mamba_hybrid.py - Custom modeling class
  • configuration_qwerky_llama_mamba_hybrid.py - Custom configuration class
  • model.safetensors - Model weights

License

See LICENSE file for details.

Downloads last month
13
Safetensors
Model size
9B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support