Spaces:
Sleeping
Sleeping
File size: 2,838 Bytes
ef55cbb 3599b15 ef55cbb 3599b15 6816184 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
---
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. |