Comments (3)
You may clear the model with del llm_model
.
from bigdl.
Thanks for the good idea del llm_model
, but I have another question.
The create_model() is set @st.cache_resource
like source code below. In my understandings, the function create_model() just run once. After I delete the old model, I'd like to create a new model with create_model(). How do I make it rerun?
@st.cache_resource
def create_model(model_name):
llm_model = IpexLLM.from_model_id(
model_name=model_name,
tokenizer_name=tokenizer_name,
context_window=4096,
max_new_tokens=512,
load_in_low_bit='asym_int4',
completion_to_prompt=completion_to_prompt,
generate_kwargs={
"do_sample": True, 'temperature': 0.1,
"eos_token_id": [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]},
#messages_to_prompt=messages_to_prompt,
device_map='xpu',
)
from bigdl.
You may use st.cache_resource.clear()
to rerun to create a new model as below:
model = create_model(name1)
del model
st.cache_resource.clear()
model = create_model(name2)
from bigdl.
Related Issues (20)
- Qwen1.5-4b and Qwen1.5-7b model cannot be loaded correctly in ipex-llm version 20240522 HOT 9
- [inference]: fine tuned model fails to do inferencing HOT 1
- ModuleNotFoundError: No module named 'ipex_llm.vllm.xpu' while using docker and installation HOT 1
- [integration]: merging bfloat16 model failed HOT 2
- all-in-one with version 2.1.0b1 failed HOT 3
- need an easy way to roll back driver installs HOT 3
- all-in-one benchmark llama-3-8b-instruct issue with version 2.1.0b1 HOT 3
- about test 3 Gpu with ipex HOT 1
- install issue HOT 2
- bug for inference qwen1.5-7b-chat with SYM_INT4 on Windows platform HOT 3
- Evaluation on if MiniCPM-2B-sft-bf16 need model based optimization on ipex-llm HOT 1
- finetune chatGLM6B using LoRA on arc HOT 3
- XEON and MAX with Kernel 5.15 configuration HOT 1
- transformers 4.38.1 gives bad llama3 performance on MTL iGPU HOT 2
- phi3 medium - garbage output in webui or generated by ollama HOT 11
- TypeError: llama_model_forward_4_36() got an unexpected keyword argument 'cache_position' during inference by TinyLlama-1.1B-Chat-v1.0 HOT 4
- Ollama codestral model produces nonsensical output on PVC HOT 3
- [Feature Request] Provide IPEX-LLM as an executable to install in Windows HOT 4
- Could ipex-llm support llama3 or the other llm QLora finetune? HOT 4
- CPU finetune can't work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigdl.