update llm params

This commit is contained in:
Gokul Mohanarangan
2023-09-22 07:49:41 +05:30
parent 009d52ea23
commit 80fd5e6176
2 changed files with 4 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ class FinalLongSummaryParams(LLMTaskParams):
def __init__(self, **kwargs): def __init__(self, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self._gen_cfg = GenerationConfig( self._gen_cfg = GenerationConfig(
max_new_tokens=800, num_beams=3, do_sample=True, temperature=0.3 max_new_tokens=1000, num_beams=3, do_sample=True, temperature=0.3
) )
self._instruct = """ self._instruct = """
Take the key ideas and takeaways from the text and create a short Take the key ideas and takeaways from the text and create a short
@@ -65,7 +65,7 @@ class FinalShortSummaryParams(LLMTaskParams):
def __init__(self, **kwargs): def __init__(self, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self._gen_cfg = GenerationConfig( self._gen_cfg = GenerationConfig(
max_new_tokens=1300, num_beams=3, do_sample=True, temperature=0.3 max_new_tokens=800, num_beams=3, do_sample=True, temperature=0.3
) )
self._instruct = """ self._instruct = """
Take the key ideas and takeaways from the text and create a short Take the key ideas and takeaways from the text and create a short
@@ -116,7 +116,7 @@ class TopicParams(LLMTaskParams):
def __init__(self, **kwargs): def __init__(self, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self._gen_cfg = GenerationConfig( self._gen_cfg = GenerationConfig(
max_new_tokens=550, num_beams=6, do_sample=True, temperature=0.9 max_new_tokens=500, num_beams=6, do_sample=True, temperature=0.9
) )
self._instruct = """ self._instruct = """
Create a JSON object as response.The JSON object must have 2 fields: Create a JSON object as response.The JSON object must have 2 fields:

View File

@@ -66,5 +66,4 @@ class AudioTranscriptProcessor(Processor):
Remove censored words from the transcript Remove censored words from the transcript
""" """
text = self.profanity_filter.censor(text) text = self.profanity_filter.censor(text)
text = text.replace("|*|", "") return text.replace("|*|", "")
return text