feat: use Ornith-1.0-35B-FP8 with multi-GPU support
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# LoRA Training Configuration for Llama-2-7b
|
||||
# Dataset: cyron_summary_lora_dataset (20k examples)
|
||||
|
||||
base_model: meta-llama/Llama-2-7b-hf
|
||||
base_model: deepreinforce-ai/Ornith-1.0-35B-FP8
|
||||
model_type: LlamaForCausalLM
|
||||
tokenizer_type: LlamaTokenizer
|
||||
|
||||
|
||||
@@ -39,10 +39,13 @@ def train(config_path):
|
||||
use_nested_quant=config.get("use_nested_quant", False),
|
||||
)
|
||||
|
||||
# Use all available GPUs
|
||||
device_map = "auto" if torch.cuda.device_count() == 1 else "balanced"
|
||||
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
quantization_config=bnb_config,
|
||||
device_map="auto",
|
||||
device_map=device_map,
|
||||
)
|
||||
model = prepare_model_for_kbit_training(model)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user