Skip to content

Conversation

@cryptk
Copy link
Collaborator

@cryptk cryptk commented Apr 30, 2024

Description

This is an attempt to not only update ROCM to 6.1, which according to the release notes should be compatible with every card that 6.0 is compatible with, but also to move away from the very very large -complete images and instead use the smaller rocm "base" images, while only pulling in the few individual things that we need from the -complete image.

This should save a couple of GB on the resulting images, as well as considerably speed up builds as we won't need to download an ~4.2GB image, but instead an ~970MB image.

Notes for Reviewers

I did some local testing, and I was able to build images, but I don't have a ROCM compatible GPU to do any in-depth testing/validation with.

Below is the complete list of packages that are installed in the -complete image that are not installed in the "base" image.

half
hipblas
hipblas-dev
hipblaslt
hipblaslt-dev
hipcub-dev
hipfft
hipfft-dev
hiprand
hiprand-dev
hipsolver
hipsolver-dev
hipsparse
hipsparse-dev
hipsparselt
hipsparselt-dev
hiptensor
hiptensor-dev
libamd2
libblas3
libcamd2
libccolamd2
libcholmod3
libcolamd2
libgfortran5
liblapack3
libmetis5
libsuitesparseconfig5
miopen-hip
miopen-hip-dev
rccl
rccl-dev
rocalution
rocalution-dev
rocblas
rocblas-dev
rocfft
rocfft-dev
rocm-libs
rocprim-dev
rocrand
rocrand-dev
rocsolver
rocsolver-dev
rocsparse
rocsparse-dev
rocthrust-dev
rocwmma-dev

Of those, the only ones I found that were required for the build to succeed are hipblas-dev and rocblas-dev which pulls in the following package set including dependencies:

hipblas
hipblas-dev
rocblas
rocblas-dev
rocsolver
rocsolver-dev
rocsparse
rocsparse-dev

We should do some testing and validation on this change in case there are other packages that are somehow needed at runtime but not needed at build time.

Signed commits

  • Yes, I signed my commits.

@netlify
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for localai canceled.

Name Link
🔨 Latest commit 564dbd9
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/663458fe65dd940008570d8c

@cryptk cryptk added the ci label Apr 30, 2024
@cryptk cryptk force-pushed the feat_updated_smaller_rocm branch from bfb3b07 to f043597 Compare April 30, 2024 21:01
@mudler
Copy link
Owner

mudler commented May 2, 2024

I think it should be safe - however I don't have an AMD card to test this on, so we might need to collect feedback from master. Maybe @jtwolfe can give this a try?

@cryptk cryptk force-pushed the feat_updated_smaller_rocm branch from f043597 to 3854749 Compare May 3, 2024 01:52
Copy link
Owner

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a new release out, I'd say that's good to test on master - thanks @cryptk for this!

@linuxtek-canada
Copy link

Tested latest commit, and was able to get the Docker image built and running successfully. Tested multiple models on my Radeon RX 7900XT successfully. I used the sample prompts from the Getting Started page. Note that I did restart the local-ai container between tests, as I saw some errors in sequential tests due to RAM limitations.

✅ Text Generation:

{"created":1714752688,"object":"chat.completion","id":"23f73eb1-1f5d-4888-86d2-52562e9d1de9","model":"gpt-4","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"I'm doing well, thank you for asking. How about you?"}}],"usage":{"prompt_tokens":15,"completion_tokens":16,"total_tokens":31}}

✅ Image Preview:

{"created":1714752610,"object":"chat.completion","id":"69adf450-37fe-4e52-ae8f-95c5f479a908","model":"gpt-4-vision-preview","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"The image shows a path leading through a field of tall grass. The sky above is partly cloudy, suggesting a mix of sun and clouds. The path appears to be a wooden boardwalk or pathway, and it's surrounded by the natural environment. The grass is green, indicating it might be spring or summer. The overall scene conveys a sense of tranquility and solitude. \u003c/s\u003e"}}],"usage":{"prompt_tokens":1,"completion_tokens":82,"total_tokens":83}}

✅ Function Calling:

  • Runs successfully, but I need to configure proper functions to get a valid result.

✅ Image Generation:

{"created":1714753952,"id":"ed8070f6-a019-4d24-b7f0-a0e81a7a46ae","data":[{"embedding":null,"index":0,"url":"http://localhost:8080/generated-images/b643165858024.png"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}

✅ Text to Speech:

  • Successfully created speech.mp3 with the audio.

❌ Speech to Text:

  • Fails with this error likely due to needing ffmpeg compiled in:
 ERR Server error error="rpc error: code = Unknown desc = error: exec: \"ffmpeg\": executable file not found in $PATH out: " ip=172.19.0.1 latency=3.46773989s method=POST status=500 url=/v1/audio/transcriptions

@linuxtek-canada
Copy link

Logged this issue for the hipblas-dev package missing the ldconfig trigger: ROCm/ROCm#3081

@mudler
Copy link
Owner

mudler commented May 3, 2024

Tested latest commit, and was able to get the Docker image built and running successfully. Tested multiple models on my Radeon RX 7900XT successfully. I used the sample prompts from the Getting Started page. Note that I did restart the local-ai container between tests, as I saw some errors in sequential tests due to RAM limitations.

✅ Text Generation:

{"created":1714752688,"object":"chat.completion","id":"23f73eb1-1f5d-4888-86d2-52562e9d1de9","model":"gpt-4","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"I'm doing well, thank you for asking. How about you?"}}],"usage":{"prompt_tokens":15,"completion_tokens":16,"total_tokens":31}}

✅ Image Preview:

{"created":1714752610,"object":"chat.completion","id":"69adf450-37fe-4e52-ae8f-95c5f479a908","model":"gpt-4-vision-preview","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"The image shows a path leading through a field of tall grass. The sky above is partly cloudy, suggesting a mix of sun and clouds. The path appears to be a wooden boardwalk or pathway, and it's surrounded by the natural environment. The grass is green, indicating it might be spring or summer. The overall scene conveys a sense of tranquility and solitude. \u003c/s\u003e"}}],"usage":{"prompt_tokens":1,"completion_tokens":82,"total_tokens":83}}

✅ Function Calling:

* Runs successfully, but I need to configure proper functions to get a valid result.

✅ Image Generation:

{"created":1714753952,"id":"ed8070f6-a019-4d24-b7f0-a0e81a7a46ae","data":[{"embedding":null,"index":0,"url":"http://localhost:8080/generated-images/b643165858024.png"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}

✅ Text to Speech:

* Successfully created speech.mp3 with the audio.

❌ Speech to Text:

* Fails with this error likely due to needing ffmpeg compiled in:
 ERR Server error error="rpc error: code = Unknown desc = error: exec: \"ffmpeg\": executable file not found in $PATH out: " ip=172.19.0.1 latency=3.46773989s method=POST status=500 url=/v1/audio/transcriptions

nice! thanks @linuxtek-canada for testing, just in time! :)

@mudler mudler merged commit a0aa5d0 into mudler:master May 3, 2024
@cryptk cryptk deleted the feat_updated_smaller_rocm branch May 3, 2024 18:10
@mudler mudler added the enhancement New feature or request label May 3, 2024
truecharts-admin referenced this pull request in trueforge-org/truecharts May 10, 2024
…5.0@f178386 by renovate (#21846)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/localai/localai](https://togithub.com/mudler/LocalAI) |
minor | `v2.14.0` -> `v2.15.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>mudler/LocalAI (docker.io/localai/localai)</summary>

###
[`v2.15.0`](https://togithub.com/mudler/LocalAI/releases/tag/v2.15.0)

[Compare
Source](https://togithub.com/mudler/LocalAI/compare/v2.14.0...v2.15.0)


![local-ai-release](https://togithub.com/mudler/LocalAI/assets/2420543/8d3738d8-7973-4c2d-9116-9d48b08ad61f)

### 🎉  LocalAI v2.15.0! 🚀

Hey awesome people! I'm happy to announce the release of LocalAI version
2.15.0! This update introduces several significant improvements and
features, enhancing usability, functionality, and user experience across
the board. Dive into the key highlights below, and don't forget to check
out the full changelog for more detailed updates.

##### 🌍 WebUI Upgrades: Turbocharged!

##### 🚀 Vision API Integration

The Chat WebUI now seamlessly integrates with the Vision API, making it
easier for users to test image processing models directly through the
browser interface - this is a very simple and hackable interface in less
then 400L of code with Alpine.JS and HTMX!


![output](https://togithub.com/mudler/LocalAI/assets/2420543/36d357ca-861d-46a9-899d-71f62fe4f977)

##### 💬 System Prompts in Chat

System prompts can be set in the WebUI chat, which guide the user
through interactions more intuitively, making our chat interface smarter
and more responsive.


![output](https://togithub.com/mudler/LocalAI/assets/2420543/555a4ad2-18d4-41e5-91a5-436d5001b9f1)

##### 🌟 Revamped Welcome Page

New to LocalAI or haven't installed any models yet? No worries! The
updated welcome page now guides users through the model installation
process, ensuring you're set up and ready to go without any hassle. This
is a great first step for newcomers - thanks for your precious feedback!


![output](https://togithub.com/mudler/LocalAI/assets/2420543/77e286fc-e045-4650-8b70-0d482ca43f0f)

##### 🔄 Background Operations Indicator

Don't get lost with our new background operations indicator on the
WebUI, which shows when tasks are running in the background.


![output](https://togithub.com/mudler/LocalAI/assets/2420543/5be17b69-7c3b-48cb-b85f-74684b292818)

##### 🔍 Filter Models by Tag and Category

As our model gallery balloons, you can now effortlessly sift through
models by tag and category, making finding what you need a breeze.


![output](https://togithub.com/mudler/LocalAI/assets/2420543/d180e9e4-0d38-42a5-84cc-98778dc7a0ad)

##### 🔧 Single Binary Release

LocalAI is expanding into offering single binary releases, simplifying
the deployment process and making it easier to get LocalAI up and
running on any system.

For the moment we have condensed the builds which disables AVX and SSE
instructions set. We are also planning to include cuda builds as well.

##### 🧠 Expanded Model Gallery

This release introduces several exciting new models to our gallery, such
as 'Soliloquy', 'tess', 'moondream2', 'llama3-instruct-coder' and
'aurora', enhancing the diversity and capability of our AI offerings.
Our selection of one-click-install models is growing! We pick carefully
model from the most trending ones on huggingface, feel free to submit
your requests in a github issue, hop to our Discord or contribute by
hosting your gallery, or.. even by adding models directly to LocalAI!


![local-ai-gallery](https://togithub.com/mudler/LocalAI/assets/2420543/c664f67f-dde3-404c-b516-d21db1131fcd)

![local-ai-gallery-new](https://togithub.com/mudler/LocalAI/assets/2420543/e0f16a10-a353-411d-9f62-2524df95bf86)

Want to share your model configurations and customizations? See the
docs: https://localai.io/docs/getting-started/customize-model/

#### 📣 Let's Make Some Noise!

A gigantic THANK YOU to everyone who’s contributed—your feedback, bug
squashing, and feature suggestions are what make LocalAI shine. To all
our heroes out there supporting other users and sharing their expertise,
you’re the real MVPs!

Remember, LocalAI thrives on community support—not big corporate bucks.
If you love what we're building, show some love! A shoutout on social
(@&#8203;LocalAI_OSS and @&#8203;mudler_it on twitter/X), joining our
sponsors, or simply starring us on GitHub makes all the difference.

Also, if you haven't yet joined our Discord, come on over! Here's the
link: https://discord.gg/uJAeKSAGDy

Thanks a ton, and.. enjoy this release!

***

#### What's Changed

##### Bug fixes 🐛

- fix(webui): correct documentation URL for text2img by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2233](https://togithub.com/mudler/LocalAI/pull/2233)
- fix(ux): fix small glitches by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2265](https://togithub.com/mudler/LocalAI/pull/2265)

##### Exciting New Features 🎉

- feat: update ROCM and use smaller image by
[@&#8203;cryptk](https://togithub.com/cryptk) in
[https://github.com/mudler/LocalAI/pull/2196](https://togithub.com/mudler/LocalAI/pull/2196)
- feat(llama.cpp): do not specify backends to autoload and add llama.cpp
variants by [@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2232](https://togithub.com/mudler/LocalAI/pull/2232)
- fix(webui): display small navbar with smaller screens by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2240](https://togithub.com/mudler/LocalAI/pull/2240)
- feat(startup): show CPU/GPU information with --debug by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2241](https://togithub.com/mudler/LocalAI/pull/2241)
- feat(single-build): generate single binaries for releases by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2246](https://togithub.com/mudler/LocalAI/pull/2246)
- feat(webui): ux improvements by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2247](https://togithub.com/mudler/LocalAI/pull/2247)
- fix: OpenVINO winograd always disabled by
[@&#8203;fakezeta](https://togithub.com/fakezeta) in
[https://github.com/mudler/LocalAI/pull/2252](https://togithub.com/mudler/LocalAI/pull/2252)
- UI: flag `trust_remote_code` to users // favicon support by
[@&#8203;dave-gray101](https://togithub.com/dave-gray101) in
[https://github.com/mudler/LocalAI/pull/2253](https://togithub.com/mudler/LocalAI/pull/2253)
- feat(ui): prompt for chat, support vision, enhancements by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2259](https://togithub.com/mudler/LocalAI/pull/2259)

##### 🧠 Models

- fix(gallery): hermes-2-pro-llama3 models checksum changed by
[@&#8203;Nold360](https://togithub.com/Nold360) in
[https://github.com/mudler/LocalAI/pull/2236](https://togithub.com/mudler/LocalAI/pull/2236)
- models(gallery): add moondream2 by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2237](https://togithub.com/mudler/LocalAI/pull/2237)
- models(gallery): add llama3-llava by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2238](https://togithub.com/mudler/LocalAI/pull/2238)
- models(gallery): add llama3-instruct-coder by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2242](https://togithub.com/mudler/LocalAI/pull/2242)
- models(gallery): update poppy porpoise by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2243](https://togithub.com/mudler/LocalAI/pull/2243)
- models(gallery): add lumimaid by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2244](https://togithub.com/mudler/LocalAI/pull/2244)
- models(gallery): add openbiollm by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2245](https://togithub.com/mudler/LocalAI/pull/2245)
- gallery: Added some OpenVINO models by
[@&#8203;fakezeta](https://togithub.com/fakezeta) in
[https://github.com/mudler/LocalAI/pull/2249](https://togithub.com/mudler/LocalAI/pull/2249)
- models(gallery): Add Soliloquy by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2260](https://togithub.com/mudler/LocalAI/pull/2260)
- models(gallery): add tess by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2266](https://togithub.com/mudler/LocalAI/pull/2266)
- models(gallery): add lumimaid variant by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2267](https://togithub.com/mudler/LocalAI/pull/2267)
- models(gallery): add kunocchini by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2268](https://togithub.com/mudler/LocalAI/pull/2268)
- models(gallery): add aurora by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2270](https://togithub.com/mudler/LocalAI/pull/2270)
- models(gallery): add tiamat by
[@&#8203;mudler](https://togithub.com/mudler) in
[https://github.com/mudler/LocalAI/pull/2269](https://togithub.com/mudler/LocalAI/pull/2269)

##### 📖 Documentation and examples

- docs: updated Transformer parameters description by
[@&#8203;fakezeta](https://togithub.com/fakezeta) in
[https://github.com/mudler/LocalAI/pull/2234](https://togithub.com/mudler/LocalAI/pull/2234)
- Update readme: add ShellOracle to community integrations by
[@&#8203;djcopley](https://togithub.com/djcopley) in
[https://github.com/mudler/LocalAI/pull/2254](https://togithub.com/mudler/LocalAI/pull/2254)
- Add missing Homebrew dependencies by
[@&#8203;michaelmior](https://togithub.com/michaelmior) in
[https://github.com/mudler/LocalAI/pull/2256](https://togithub.com/mudler/LocalAI/pull/2256)

##### 👒 Dependencies

- ⬆️ Update docs version mudler/LocalAI by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2228](https://togithub.com/mudler/LocalAI/pull/2228)
- ⬆️ Update ggerganov/llama.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2229](https://togithub.com/mudler/LocalAI/pull/2229)
- ⬆️ Update ggerganov/whisper.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2230](https://togithub.com/mudler/LocalAI/pull/2230)
- build(deps): bump tqdm from 4.65.0 to 4.66.3 in
/examples/langchain/langchainpy-localai-example in the pip group across
1 directory by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/mudler/LocalAI/pull/2231](https://togithub.com/mudler/LocalAI/pull/2231)
- ⬆️ Update ggerganov/llama.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2239](https://togithub.com/mudler/LocalAI/pull/2239)
- ⬆️ Update ggerganov/llama.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2251](https://togithub.com/mudler/LocalAI/pull/2251)
- ⬆️ Update ggerganov/llama.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2255](https://togithub.com/mudler/LocalAI/pull/2255)
- ⬆️ Update ggerganov/llama.cpp by
[@&#8203;localai-bot](https://togithub.com/localai-bot) in
[https://github.com/mudler/LocalAI/pull/2263](https://togithub.com/mudler/LocalAI/pull/2263)

##### Other Changes

- test: check the response URL during image gen in `app_test.go` by
[@&#8203;dave-gray101](https://togithub.com/dave-gray101) in
[https://github.com/mudler/LocalAI/pull/2248](https://togithub.com/mudler/LocalAI/pull/2248)

#### New Contributors

- [@&#8203;Nold360](https://togithub.com/Nold360) made their first
contribution in
[https://github.com/mudler/LocalAI/pull/2236](https://togithub.com/mudler/LocalAI/pull/2236)
- [@&#8203;djcopley](https://togithub.com/djcopley) made their first
contribution in
[https://github.com/mudler/LocalAI/pull/2254](https://togithub.com/mudler/LocalAI/pull/2254)
- [@&#8203;michaelmior](https://togithub.com/michaelmior) made their
first contribution in
[https://github.com/mudler/LocalAI/pull/2256](https://togithub.com/mudler/LocalAI/pull/2256)

**Full Changelog**:
mudler/LocalAI@v2.14.0...v2.15.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM1My4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9ub24tbWFqb3IiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants