deep-diver / Vid2Persona

This project breathes life into video characters by using AI to describe their personality and then chat with you as them.
45 stars 6 forks source link

Pipeline/llm #6

Closed deep-diver closed 8 months ago

deep-diver commented 8 months ago

This PR was tested with both

Some changes are for introducing Async feature. The next step is to build Gradio app.

deep-diver commented 8 months ago

@sayakpaul

I found it is difficult to limit the input tokens < max-input-token-length:

<|system|>
ALWAYS KEEP THIS PART
<|user|>
.....MIGHT NEED TO BE TRIMMED WITHIN <|user|> section, but we should keep <|user|> special token.
<|assistant|>
.....
<|user|>
WHATEVER USER's say

The main obstacle is to keep special tokens, and trim down the actual contents inside each special tokens (possible just remove the whole thing if the len(content) becomes zero after trimming.

What do you think? I mean we don't need to tackle this issue within this project, but wanted to discuss about what I have found so far. If you already know the solution for this, please let me know!

sayakpaul commented 8 months ago

Do you want to post it on the fellows channel and tag me?