When using the Llama3 model with a stop_at parameter in the extra body, the generation continues indefinitely if the model doesn't output the specified stop_at string. This leads to unexpected behavior and potential resource waste.
Temperature Value Handling:
According to the OpenAI documentation, the temperature value ranges from 0 to 2. However, the existing code handles it as if it ranges from 0 to 1.
Solution
Stop Condition Fix:
Modified the stop conditions to rely solely on the preferred_eos variable. The stop_at parameter is already handled within preferred_eos in earlier steps of the process.
Temperature Range Adjustment:
Adjusted the handling of the temperature value to ensure that any value exceeding 2 is limited to 2, adhering to OpenAI's specified range.
Testing Conducted
Stop Condition Testing:
Verified that the generation stops correctly when stop_at is reached.
Confirmed that the generation completes normally when stop_at is not encountered.
Tested with various input prompts and stop_at values to ensure robust handling.
Temperature Value Testing:
Checked behavior by passing temperature > 2, confirming that the server sets the upper limit to 2 and processes the job correctly.
Problems Addressed
Indefinite Generation with
stop_at
Parameter:stop_at
parameter in the extra body, the generation continues indefinitely if the model doesn't output the specifiedstop_at
string. This leads to unexpected behavior and potential resource waste.Temperature Value Handling:
Solution
Stop Condition Fix:
preferred_eos
variable. Thestop_at
parameter is already handled withinpreferred_eos
in earlier steps of the process.Temperature Range Adjustment:
Testing Conducted
Stop Condition Testing:
stop_at
is reached.stop_at
is not encountered.stop_at
values to ensure robust handling.Temperature Value Testing: