Comments (3)
this is a very non expert opinion so fair warning -
This was my original code -
'base_model_id = "mistralai/Mistral-7B-v0.1"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
model = AutoModelForCausalLM.from_pretrained(base_model_id,
quantization_config=bnb_config,
device_map= 'auto'
)'
When I ran this code, I faced the error RuntimeError: I expected all tensors to be on the same device, but I found at least two devices, cuda:6 and cuda:7! (when checking argument for argument mat2 in method wrapper_CUDA_mm).
I then also tried setting a fixed device as the default device using torch.cuda.set_device(2) and {'':torch.cuda.current_device()}
Then I faced your error.
After this, I removed quantisation from the model and saw that it was not causing multitasking problems, and this notebook was working without that quantisation in model code -
https://github.com/brevdev/notebooks/blob/main/mistral-finetune-own-data.ipynb
There might be a problem while sending multiple layers to different devices while they are quantised.
from text-generation-inference.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
from text-generation-inference.
I believe this issue still deserves some attention?
from text-generation-inference.
Related Issues (20)
- LoRA Adapter from local model are leading to error HOT 4
- HF web service streaming response differs from OpenAI, breaking clients
- StarCoder2 AWQ does not work correctly
- Document Request HOT 2
- metric: tgi_request_total increments by 2 upon every request
- error: unexpected argument ‘–max-input-tokens’ found HOT 1
- Clarification and supplement to the online docs example
- Docs missing for LLaVA NeXT Model
- Phi-3 not starting on TGI 2.0.3 in kubernetes cluster HOT 2
- Wrong validations on `Parameters` in TGI python library
- LlavaNext Model cannot be started
- version in docker not correct
- Pydantic validation error re: ChoiceDelta (text_generation/types.py)
- TGI crash during Warming up model - invalid opcode in rotary_emb.cpython-310-x86_64-linux-gnu.so HOT 1
- Phi-3 medium 128k instruct fails to start HOT 7
- Falcon 11B VLM Support
- multiple origins
- Launching Idefics2 QLoRA failing on warmup - shape mismatch: value tensor of shape [64, 4096] cannot be broadcast to indexing result of shape [320, 4096] HOT 3
- Expose `ignore_eos_token` to HTTP endpoints
- AttributeError: module 'vllm._C.ops' has no attribute 'moe_align_block_size'
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 text-generation-inference.