Skip to content

Commit

Permalink
[fix] Add lstrip to pipeline model output
Browse files Browse the repository at this point in the history
  • Loading branch information
tamoyan committed Jul 18, 2024
1 parent 573e264 commit 99a6cfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llm_roleplay/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.6
2.0.7
3 changes: 1 addition & 2 deletions llm_roleplay/models/model_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ def generate(self, prompt: str, generate_cfg):
turn_response = turn_response.split(self_reply_token)[0]
self.aim_run["num_self_replies"] += 1

turn_response = turn_response.lstrip()
model_output_template = self.conv_template.model_output.replace(
self.spec_tokens.model_answer, turn_response
)

# del output_tokenized

return turn_response, model_output_template

def update_history(self, prompt, output_extract):
Expand Down

0 comments on commit 99a6cfc

Please sign in to comment.