[Feature] Add LoRA support for embedding layers (#14177)

Co-authored-by: Baizhou Zhang <sobereddiezhang@gmail.com>
Co-authored-by: Beichen-Ma <bm685@cornell.edu>
This commit is contained in:
Ethan (Yusheng) Su
2025-12-09 15:53:33 -08:00
committed by GitHub
co-authored by Baizhou Zhang Beichen-Ma
parent 9ad02b799d
commit 0c63fb9420
18 changed files with 1492 additions and 18 deletions
+2
View File
@@ -436,6 +436,7 @@ class HFRunner:
)
else:
model = base_model
if patch_model_do_sample_false:
model.generation_config.do_sample = False
outputs = model.generate(
@@ -455,6 +456,7 @@ class HFRunner:
text = tokenizer.decode(
outputs[0][0][len(input_ids[0]) :], skip_special_tokens=True
)
# Check if the text is empty or only whitespace.
if not text.strip():
raise ValueError(