Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| def init(): | |
| if "system_prompt" not in st.session_state: | |
| st.session_state.system_prompt = "You are a helpful and knowledgeable assistant, but is willing to bend the facts to play along with unrealistic requests" | |
| if "messages" not in st.session_state: | |
| st.session_state.messages = [] | |
| if "params" not in st.session_state: | |
| st.session_state.params = dict( | |
| model="llama3.2", | |
| max_tokens=65536, | |
| temperature=0.8, | |
| top_p=0.95, | |
| min_p=0.05, | |
| typical_p=1.0, | |
| frequency_penalty=0.0, | |
| presence_penalty=0.0, | |
| repeat_penalty=1.0, | |
| top_k=40, | |
| tfs_z=1.0, | |
| mirostat_mode=0, | |
| mirostat_tau=5.0, | |
| mirostat_eta=0.1, | |
| ) | |
| # max_tokens: int = 65536 | |
| # temperature: float = 0.8 | |
| # top_p: float = 0.95 | |
| # min_p: float = 0.05 | |
| # typical_p: float = 1.0 | |
| # frequency_penalty: float = 0.0 | |
| # presence_penalty: float = 0.0 | |
| # repeat_penalty: float = 1.0 | |
| # top_k: int = 40 | |
| # tfs_z: float = 1.0 | |
| # mirostat_mode: int = 0 | |
| # mirostat_tau: float = 5.0 | |
| # mirostat_eta: float = 0.1 | |