Comments (5)
Running the models in half precision should work and make neo 2.7B be able to run in 8GB with barely any impact on accuracy. My transformers fork should already be casting the model to half precision automatically as well, unless it's getting cast back to fp32 after loading somehow.
The vanilla model's weights are fp32 though, so while loading it will use the full amount of system memory. There's a pre-halved version torrent floating around somewhere.
from koboldai-client.
Check your installed version of PyTorch. Models in KoboldAI are initialized through transformers pipelines; while the GPT-2 variants will load and run without PyTorch installed at all, GPT-Neo requires torch even through transformers. As for total memory usage, I'd recommend installing finetune's transformers branch, it'll reduce VRAM usage for Neo-2.7B from 12GB down to about 6.5-7.
pip install https://github.com/finetuneanon/transformers/archive/refs/heads/gpt-neo-dungeon-localattention1.zip
from koboldai-client.
pip install https://github.com/finetuneanon/transformers/archive/refs/heads/gpt-neo-dungeon-localattention1.zip
Interesting. I ran that, and then tried again. This time, with GPT-Neo 2.7b, it immediately started loading it into GPU memory, and in the end successfully loaded on my system without causing it to hang, almost identical to CloverEdition loading GPT-Neo 2.7b. Awesome!
Just one issue, though: Where CloverEdition's system memory usage dropped back down to 1.2 GB once it finished loading the AI model, KoboldAI's system memory usage is staying up at nearly 11 GB still allocated to it. Between it and Windows itself, that's not leaving much available for other stuff.
EDIT:
OK, I just noticed that memory usage did finally drop down to less than 1 GB system memory used by KoboldAI, I guess it just took a few minutes? Not sure why it took so long, but I guess it's not a problem since it did eventually free that huge chunk of system memory up.
from koboldai-client.
I definitely think that should be added to the project readme, it makes the larger models playable on a much wider range of hardware with the greatly reduced memory requirements.
from koboldai-client.
0.16 has been released with breakmodel allowing you to further manage memory, the readme has also been overhauled so people are pointed towards a version most suitable for them which is Finetuneanon's (newer) version for GPU users.
from koboldai-client.
Related Issues (20)
- Installation error saying cannot find HOME HOT 1
- Issue downloading models HOT 1
- Kobold AI not utilize all cpus HOT 1
- delete
- softprompt tuner not working HOT 2
- Slow HOT 1
- How to set an API secret ? HOT 3
- No longer update? HOT 1
- ImportError: cannot import name 'dependency_versions_check'
- Colab readme.md link 404
- Micromamba URI can get corrupted by wget [Linux] HOT 1
- Change chat format with API
- The process suddenly stops for some reason
- Problem at remote-play HOT 3
- Colab only showing one model HOT 1
- Error when generating story HOT 1
- Fix def get_folder_path_info(base) for MacOS - any input?
- model type issue
- ImportError: cannot import name 'BaseResponse' from 'werkzeug.wrappers'
- Trying to set up, but fails: "ModuleNotFoundError: No module named 'eventlet'" HOT 3
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 koboldai-client.