Spaces:
Runtime error
Runtime error
Locutusque
commited on
Commit
•
14300ac
1
Parent(s):
f09eac6
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import os
|
|
9 |
# Install flash-attn
|
10 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
11 |
# Initialize the model pipeline
|
12 |
-
generator = pipeline('text-generation', model='Locutusque/Hyperion-2.
|
13 |
@spaces.GPU
|
14 |
def generate_text(prompt, temperature, top_p, top_k, repetition_penalty, max_length):
|
15 |
# Generate text using the model
|
|
|
9 |
# Install flash-attn
|
10 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
11 |
# Initialize the model pipeline
|
12 |
+
generator = pipeline('text-generation', model='Locutusque/Hyperion-2.1-Mistral-7B', torch_dtype=torch.bfloat16, token=os.environ["HF"])
|
13 |
@spaces.GPU
|
14 |
def generate_text(prompt, temperature, top_p, top_k, repetition_penalty, max_length):
|
15 |
# Generate text using the model
|