fix: #3667 - The recommended label should be hidden #3687
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
It can be confusing when a recommended tag is applied to all models using the
model size < available RAM/VRAM
formula, because in reality, these models can still perform slowly on users' machines due to lack of GPU acceleration and the need to handle large contexts.Decision
Hide the "Recommended" tag in the Hub and only display compatibility tags for models that are marked as "Slow on your device" or "Not enough RAM".
Fixes Issues
Recommended
tag in Hub #3667Screenshots
Changes made
Changes in
ModelLabel.test.tsx
:Three test cases are defined to cover different scenarios:
* The first test case checks if the
ModelLabel
component renders theNotEnoughMemoryLabel
when the minimum RAM model is greater than the total RAM.* The second test case checks if the
ModelLabel
component renders theSlowOnYourDeviceLabel
when the minimum RAM model is less than the total RAM but greater than the available RAM.* The third test case checks if the
ModelLabel
component renders nothing when the minimum RAM model is less than the available RAM.Changes in
index.tsx
:index.tsx
file has been updated to remove theRecommendedLabel
import and component invocation.ModelLabel
component's logic has been updated to only render theSlowOnYourDeviceLabel
when the minimum RAM model is less than the total RAM and the available RAM. TheRecommendedLabel
component is no longer conditionally rendered.