Created on ‎03-06-2024 12:10 PM
Earlier this year Cloudera Machine Learning (CML) added a new way to accelerate GenAI projects by tapping into Hugging Face Spaces and deploying these projects right inside of CML with just a few clicks. With over 6,500 spaces as of this writing, Hugging Face community is still growing rapidly and provides a convenient platform for practitioners and organizations to share their work in areas from classical machine learning to the latest GenAI research. In this article you will learn how to enable and use this feature to accelerate your own ML projects.
The default Hugging Face Spaces AMP catalog is enabled for all CML Public Cloud workspaces starting from version 2.0.43-b208. To enable users to launch external Hugging Face AMPs, additional steps are necessary (see end of this article).
Let's dive right in and see how simple it is to deploy a Hugging Face AMP:
At this point CML kicks off the steps required to launch this Hugging Face Space, namely installing dependencies and launching an application. After the steps are completed, the AMP will be fully deployed.
Clicking on Applications in the left side-bar, you can see a gradio app deployed. Clicking on the app's card (Application to serve UI :link:) will take you to the app's UI, opened in a new tab of your web browser. It will look like this:
Applied ML Prototypes (AMPs) are packaged projects that include execution steps that CML can understand and perform. The owner of a project defines .project-metadata.yaml in their project repository to instruct CML on what steps should be done run code, schedule a job, or deploy a model, etc.). In the case of Hugging Face Spaces this metadata is injected on the fly by CML as the project is being spun up. The two steps that are executed with Hugging Space AMPs are the following:
Once a Hugging Face AMP is launched in CML, users can treat it as any other local project, reviewing the code, making changes, breaking things and learning as they go. The goal is to accelerate innovation in the enterprise and adjust open projects to meet the requirements of specific customer use cases.
While Hugging Face Spaces AMPs is a Tech Preview feature, there is a setting that needs to be enabled in the ML Workspace to make it available to the users. For this you will need to have MLAdmin role in the workspace or work with your workspace administrator through the following steps:
Inside of the ML Workspace, navigate to Site Administration
Once this setting is enabled, users will not only deploy Hugging Face Spaces AMPs from the existing catalog, but also let them point to any Hugging Face space and start working with it as a project within CML. In Tech Preview this supports gradio and streamlit applications only.
At Cloudera we strive to give customers options, from deployment models on-prem or in the cloud to using external or internally-hosted Large Language Models. Introduction of Hugging Face Spaces integration in CML will significantly accelerate customers' Machine Learning projects, especially those focused on Generative AI.
Created on ‎04-30-2024 08:28 AM
Excellent work here Oleksandr!!