Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import uvicorn
|
2 |
from fastapi import FastAPI, HTTPException, Request
|
3 |
from auto_gptq import AutoGPTQForCausalLM
|
|
|
|
|
4 |
import torch
|
5 |
import optimum
|
6 |
from transformers import (AutoModelForCausalLM, AutoTokenizer, LlamaForCausalLM, LlamaTokenizer, GenerationConfig, pipeline,)
|
|
|
1 |
import uvicorn
|
2 |
from fastapi import FastAPI, HTTPException, Request
|
3 |
from auto_gptq import AutoGPTQForCausalLM
|
4 |
+
import os
|
5 |
+
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True'
|
6 |
import torch
|
7 |
import optimum
|
8 |
from transformers import (AutoModelForCausalLM, AutoTokenizer, LlamaForCausalLM, LlamaTokenizer, GenerationConfig, pipeline,)
|