safetensor chat
Browse files- chat_HF.py → chat.py +6 -6
chat_HF.py → chat.py
RENAMED
|
@@ -47,7 +47,7 @@ logging.basicConfig(
|
|
| 47 |
logger = logging.getLogger(__name__)
|
| 48 |
|
| 49 |
# Default model repository
|
| 50 |
-
DEFAULT_MODEL_REPO = "MistyozAI/CosmicFish-
|
| 51 |
|
| 52 |
# Default prompt template
|
| 53 |
DEFAULT_PROMPT_TEMPLATE = "Below is a conversation between a helpful AI assistant and a human. The assistant is knowledgeable, friendly, and provides detailed and accurate responses.\n\n"
|
|
@@ -59,9 +59,9 @@ class CosmicConfig:
|
|
| 59 |
def __init__(self,
|
| 60 |
vocab_size=50257,
|
| 61 |
block_size=512,
|
| 62 |
-
n_layer=
|
| 63 |
n_head=16,
|
| 64 |
-
n_embd=
|
| 65 |
bias=True,
|
| 66 |
dropout=0.0,
|
| 67 |
n_query_groups=4,
|
|
@@ -998,9 +998,9 @@ def main():
|
|
| 998 |
help="Device to use (cuda or cpu)")
|
| 999 |
|
| 1000 |
# Generation parameters
|
| 1001 |
-
parser.add_argument("--temperature", type=float, default=0.
|
| 1002 |
help="Temperature for sampling (default: 0.7)")
|
| 1003 |
-
parser.add_argument("--max_tokens", type=int, default=
|
| 1004 |
help="Maximum number of tokens to generate per response")
|
| 1005 |
parser.add_argument("--min_tokens", type=int, default=10,
|
| 1006 |
help="Minimum number of tokens to generate per response")
|
|
@@ -1019,7 +1019,7 @@ def main():
|
|
| 1019 |
parser.add_argument("--instruction", type=str,
|
| 1020 |
default=DEFAULT_PROMPT_TEMPLATE,
|
| 1021 |
help="Instruction prompt to prepend to the conversation")
|
| 1022 |
-
parser.add_argument("--max_history", type=int, default=
|
| 1023 |
help="Maximum number of tokens to keep in history")
|
| 1024 |
|
| 1025 |
# UI parameters
|
|
|
|
| 47 |
logger = logging.getLogger(__name__)
|
| 48 |
|
| 49 |
# Default model repository
|
| 50 |
+
DEFAULT_MODEL_REPO = "MistyozAI/CosmicFish-90M"
|
| 51 |
|
| 52 |
# Default prompt template
|
| 53 |
DEFAULT_PROMPT_TEMPLATE = "Below is a conversation between a helpful AI assistant and a human. The assistant is knowledgeable, friendly, and provides detailed and accurate responses.\n\n"
|
|
|
|
| 59 |
def __init__(self,
|
| 60 |
vocab_size=50257,
|
| 61 |
block_size=512,
|
| 62 |
+
n_layer=10,
|
| 63 |
n_head=16,
|
| 64 |
+
n_embd=640,
|
| 65 |
bias=True,
|
| 66 |
dropout=0.0,
|
| 67 |
n_query_groups=4,
|
|
|
|
| 998 |
help="Device to use (cuda or cpu)")
|
| 999 |
|
| 1000 |
# Generation parameters
|
| 1001 |
+
parser.add_argument("--temperature", type=float, default=0.5,
|
| 1002 |
help="Temperature for sampling (default: 0.7)")
|
| 1003 |
+
parser.add_argument("--max_tokens", type=int, default=512,
|
| 1004 |
help="Maximum number of tokens to generate per response")
|
| 1005 |
parser.add_argument("--min_tokens", type=int, default=10,
|
| 1006 |
help="Minimum number of tokens to generate per response")
|
|
|
|
| 1019 |
parser.add_argument("--instruction", type=str,
|
| 1020 |
default=DEFAULT_PROMPT_TEMPLATE,
|
| 1021 |
help="Instruction prompt to prepend to the conversation")
|
| 1022 |
+
parser.add_argument("--max_history", type=int, default=512,
|
| 1023 |
help="Maximum number of tokens to keep in history")
|
| 1024 |
|
| 1025 |
# UI parameters
|