Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ DEFAULT_MAX_NEW_TOKENS = 1024
|
|
| 12 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 13 |
|
| 14 |
#if torch.cuda.is_available():
|
| 15 |
-
model_id = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 16 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, trust_remote_code=True, device_map="auto")
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 18 |
#tokenizer.use_default_system_prompt = False
|
|
|
|
| 12 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 13 |
|
| 14 |
#if torch.cuda.is_available():
|
| 15 |
+
model_id = "openai-community/gpt2" #"mistralai/Mistral-7B-Instruct-v0.1"
|
| 16 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, trust_remote_code=True, device_map="auto")
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 18 |
#tokenizer.use_default_system_prompt = False
|