Describe the bug
DeepSpeed kernel injection assumes that the loaded Llama configuration exposes LlamaConfig.rope_theta. DeepSeek-R1-Distill-Llama-8B uses a newer rotary-configuration schema without that attribute.
To Reproduce
Steps to reproduce the behavior:
- Save the following as a shell command and run it in a shell on a machine with a free CUDA device.
- Run the command in the target Python environment with the listed dependencies installed.
- Observe the startup or generation result.
import torch
import deepspeed
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "/root/.cache/huggingface/hub/models--deepseek-ai--DeepSeek-R1-Distill-Llama-8B/snapshots/6a6f4aa4197940add57724a7707d069478df56b1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name, torch_dtype=torch.bfloat16
).to("cuda")
engine = deepspeed.init_inference(
model,
config={
"triangular_masking": False,
"set_empty_params": True,
"replace_with_kernel_inject": True,
},
)
print("DeepSpeed inference engine initialized")
Actual behavior
Startup fails during module injection with AttributeError: LlamaConfig object has no attribute rope_theta. The same normalized configuration passes on the independent Qwen3 control.
Expected behavior
The current configuration schema should be supported, or the incompatibility should be reported with a clear diagnostic before injection.
System info (please complete the following information):
- OS: Ubuntu 22.04.3 LTS
- GPU count and types: 1 x NVIDIA H100 80GB HBM3
- DeepSpeed version: 0.19.1
- DeepSpeed-MII: not used
- PyTorch: 2.9.1+cu128
- Transformers: 5.15.0
- CUDA reported by PyTorch: 12.8
- nvcc: 13.3
- Python version: 3.12.12
- Target runtime: /root/anaconda3/envs/deepspeed128
Docker context
No Docker image was used. The reproduction ran directly on Ubuntu 22.04.3 LTS in the target conda environment.
Describe the bug
DeepSpeed kernel injection assumes that the loaded Llama configuration exposes LlamaConfig.rope_theta. DeepSeek-R1-Distill-Llama-8B uses a newer rotary-configuration schema without that attribute.
To Reproduce
Steps to reproduce the behavior:
Actual behavior
Startup fails during module injection with AttributeError: LlamaConfig object has no attribute rope_theta. The same normalized configuration passes on the independent Qwen3 control.
Expected behavior
The current configuration schema should be supported, or the incompatibility should be reported with a clear diagnostic before injection.
System info (please complete the following information):
Docker context
No Docker image was used. The reproduction ran directly on Ubuntu 22.04.3 LTS in the target conda environment.