Skip to content

Commit a4165aa

Browse files
committed
add test for function to change multiple lora weights
1 parent c93a618 commit a4165aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/Runtime/TestLLM.cs

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public void TestLoras()
5757
Assert.AreEqual(llm.lora, lora1 + " " + lora2);
5858
Assert.AreEqual(llm.loraWeights, "0.8 0.1");
5959

60+
Dictionary<string, float> loraToWeight = new Dictionary<string, float>();
61+
loraToWeight[lora1] = 0;
62+
loraToWeight[lora2] = 0.2f;
63+
llm.SetLoraWeights(loraToWeight);
64+
Assert.AreEqual(llm.lora, lora1 + " " + lora2);
65+
Assert.AreEqual(llm.loraWeights, "0 0.2");
66+
6067
File.Delete(lora1);
6168
File.Delete(lora2);
6269
}

0 commit comments

Comments
 (0)