Vitrous commited on
Commit
d2c9447
·
verified ·
1 Parent(s): 4f9ba28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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,)