--- license: mit title: smallagent sdk: docker emoji: 🏃 colorFrom: red colorTo: yellow short_description: This Hugging Face Space provides a self-hosted, OpenAI-compa --- # Self-Hosted Qwen2.5-0.5B API on Hugging Face This Hugging Face Space provides a self-hosted, OpenAI-compatible API for the `Qwen/Qwen2.5-0.5B-Instruct` model. It is designed to run on free CPU hardware and allows you to connect various tools and applications (like IDE extensions) that support custom API endpoints. ## ✨ Key Features * **Free Hosting**: Runs on the free "CPU basic" hardware provided by Hugging Face Spaces. * **OpenAI-Compatible**: Exposes `/models` and `/chat/completions` endpoints that mimic the OpenAI API structure, making it compatible with a wide range of clients. * **Streaming Support**: The API streams responses back, which is required by many modern clients for a real-time, "typing" effect. * **Lightweight & Fast**: Uses the `Qwen2.5-0.5B-Instruct` model, which is extremely small and optimized for fast responses on a CPU. ## 🚀 How to Use To connect your application or client to this API, you need to configure it with the following settings. ### 1. Get the API Base URL The Base URL is the main URL of this Hugging Face Space. **`https://enzgamers-smallagent.hf.space`** **Important Note:** Do **not** add `/chat/completions` or anything else to the end of the Base URL. Your client application will add the correct path automatically. ### 2. Configure Your Client In your application's settings (e.g., a VS Code extension like Cline, a web UI, etc.), find the API configuration section and enter the following details: * **API Provider / Type**: Select **`OpenAI-Compatible`** or a similar option. * **Base URL**: ``` https://enzgamers-smallagent.hf.space ``` * **API Key**: You can enter **any value**. This API does not require authentication, but your client's UI might require the field to be filled. Examples: `123456`, `hf_space`, `not_needed`. * **Model ID**: (Optional, but recommended) ``` Qwen/Qwen2.5-0.5B-Instruct ``` ### Example Configuration Summary API Provider: OpenAI-Compatible Base URL: https://enzgamers-smallagent.hf.space API Key: any_value Model ID: Qwen/Qwen2.5-0.5B-Instruct After saving these settings, your application should be able to communicate with this model. ## 🛠️ Technical Details * **Model**: `Qwen/Qwen2.5-0.5B-Instruct` * **Framework**: The API is built with [FastAPI](https://fastapi.tiangolo.com/). * **Server**: The application is served by [Uvicorn](https://www.uvicorn.org/) running inside a Docker container. ## 📄 Disclaimer This Space is provided for educational and personal use. It runs on shared, free hardware and is not intended for production-level traffic or performance-critical applications.