@@ -201,7 +201,7 @@ def get_model_name():
201201 "llama3-8b-unmerged-lora-with-custom-code" : {
202202 "option.model_id" : "s3://djl-llm/llama-3-8b-instruct-hf/" ,
203203 "batch_size" : [4 ],
204- "seq_length" : [16 , 32 ],
204+ "seq_length" : [32 , 64 ],
205205 "worker" : 1 ,
206206 "adapters" : ["medical" , "exam" ],
207207 "tokenizer" : "unsloth/llama-3-8b-Instruct" ,
@@ -821,6 +821,9 @@ def extract_chat_content(response_content):
821821 line = line .strip ()
822822 if not line :
823823 continue
824+
825+ if line .startswith ("data: " ):
826+ line = line [6 :] # Remove "data: " prefix
824827 try :
825828 parsed = json .loads (line )
826829 # Non-streaming chat completion format
@@ -1576,6 +1579,16 @@ def response_checker(res, message):
15761579 for item in message .split ('\n ' ):
15771580 item = item .strip ()
15781581 if len (item ) > 0 :
1582+ if item .startswith ('data: ' ):
1583+ item = item [6 :] # Remove "data: " prefix
1584+
1585+ # Skip [DONE] markers
1586+ if item == '[DONE]' :
1587+ continue
1588+
1589+ # Skip empty items after stripping
1590+ if not item :
1591+ continue
15791592 try :
15801593 json_lines .append (json .loads (item ))
15811594 except json .JSONDecodeError as e :
@@ -1714,6 +1727,18 @@ def check_output_formatter_applied(response_text, expected_identifier):
17141727 line = line .strip ()
17151728 if not line :
17161729 continue
1730+
1731+ if line .startswith ('data: ' ):
1732+ line = line [6 :] # Remove "data: " prefix
1733+
1734+ # Skip [DONE] markers
1735+ if line == '[DONE]' :
1736+ continue
1737+
1738+ # Skip empty lines after stripping
1739+ if not line :
1740+ continue
1741+
17171742 try :
17181743 parsed_json = json .loads (line )
17191744 # Check for text completion format
0 commit comments