> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-hi/train/neural-architecture-search.md).

# Neural Architecture Search

<figure><img src="/files/c57a18d202c9f2223d59663c934f463ade6ab176" alt="NAS results page showing a Pareto frontier of trained models plotted across latency and accuracy."><figcaption><p>NAS results page speed-vs-accuracy Pareto frontier के along हर trained model दिखाती है.</p></figcaption></figure>

Roboflow का Neural Architecture Search (NAS) एक शक्तिशाली नया feature है जो आपके dataset पर automatically दर्जनों model architectures train करता है और speed-vs-accuracy tradeoff curve के along best options दिखाता है, जिससे चुनने के लिए कई model options मिलते हैं और traditional model training strategies की तुलना में cost-per-model कम होती है.

जैसा कि समझाया गया है [RF-DETR paper में](https://arxiv.org/html/2511.09554v2), इस Neural Architecture Search strategy ने RF-DETR की SOTA model architecture बनाई। Roboflow इस strategy को सभी Roboflow customers के लिए उपलब्ध करा रहा है, ताकि कोई भी अपने use case के लिए SOTA models बना सके.

Neural Architecture Search:

* आपके data characteristics के आधार पर आपके use case के लिए सबसे उपयुक्त model architecture की पहचान करता है
* उस architecture को आपके data पर fine-tune करता है
* 5,000 से अधिक configurations का परीक्षण करता है, जिसके परिणामस्वरूप 10-100 trained models मिलते हैं, जो हर latency point पर accuracy के लिए optimized होते हैं.

{% embed url="<https://youtu.be/ZtGXkuo1qiE>" %}

## Neural Architecture Search कब उपयोग करें

जब आप उस model को चुन रहे हों जो production में जाएगा, तब NAS लगभग हमेशा चलाने लायक होता है। क्योंकि Pareto frontier पर हर mined model आपके data पर पूरी तरह trained होता है, इसलिए आप सिर्फ एक size नहीं चुनते — आप अपने specific deployment target के लिए सबसे अच्छा speed/accuracy tradeoff चुनते हैं। वास्तविक customer runs में, NAS अक्सर उसी latency पर एक single RF-DETR Medium fine-tune को नियमित रूप से पछाड़ देता है, और कई बार काफी बड़े अंतर से.

NAS का उपयोग करें जब:

* आपको दिए गए latency budget पर बेहतर accuracy, या दिए गए accuracy target पर बेहतर latency चाहिए.
* आप production के लिए model तैयार कर रहे हैं और speed/accuracy curve के along विकल्पों की तुलना करना चाहते हैं.
* वरना आप hyperparameter sweep चलाते या कई model sizes को back-to-back train करते.
* आपको state-of-the-art performance चाहिए.

NAS जरूरत से ज़्यादा हो सकता है अगर:

* आपका use case सीधा है और एक "good enough" model पर्याप्त है (जैसे, अच्छी रोशनी वाले environment में लोगों का पता लगाना). Exploratory या early-stage projects के लिए, आम तौर पर एक single fine-tune ही सही विकल्प होता है.
* आप केवल CPU पर deploy करने की योजना बना रहे हैं.
* आप केवल सबसे बड़ा RF-DETR checkpoint (जैसे, RF-DETR XXL) चाहते हैं और छोटे trade-off points की परवाह नहीं करते.

## लागत, credits, और plan उपलब्धता

NAS उन सभी paid Roboflow plans पर उपलब्ध है जिनमें usage-based billing शामिल है। Trial, Free, और Public plan users को NAS का access नहीं है। Legacy plans जिनमें usage-based billing नहीं है, उनसे NAS run शुरू करने से पहले इसे enable करने के लिए कहा जाएगा.

NAS runs का billing मानक Roboflow training rate पर होता है — **training time के 30 मिनट पर 1 credit** — किसी भी अन्य training job के समान hourly rate। एक run दर्जनों trained models बनाता है, इसलिए लागत *प्रति model* प्रत्येक को अलग-अलग train करने की तुलना में कम होती है, लेकिन एक single NAS job के लिए कुल credit spend, एक single fine-tune की तुलना में अधिक होती है.

योजना बनाने के लिए सामान्य ranges:

* \~2,500-images वाला object detection dataset आम तौर पर \~18 घंटे (\~36 credits) चलता है.
* **Instance Segmentation NAS** object detection NAS की तुलना में अधिक GPU-intensive है — लगभग 1.5–2x लंबे runs की उम्मीद करें.

Train UI शुरू करने से पहले estimated duration और credit cost दिखाता है। अगर अनुमान एक दिन की training से अधिक हो, तो job शुरू होने से पहले आपसे confirm करने के लिए कहा जाएगा.

{% hint style="warning" %}
अगर आपके workspace में flex billing disabled है और आपके included credits run के बीच खत्म हो जाते हैं, तो NAS अपने आप रुक जाएगा। Included-credit balance की परवाह किए बिना run को पूरा होने देने के लिए, शुरू करने से पहले flex billing enable करें.
{% endhint %}

## NAS बनाम YOLO-NAS

{% hint style="info" %}
यहाँ वर्णित "Neural Architecture Search" engine, इससे अलग है **YOLO-NAS**, एक single YOLO-based architecture जो Roboflow model list में भी दिखाई देती है। अगर आपने विशेष रूप से NAS का उपयोग करने के लिए upgrade किया है, तो सुनिश्चित करें कि आप चुन रहे हैं **Neural Architecture Search** Train page पर engine — न कि YOLO-NAS model architecture.
{% endhint %}

Roboflow NAS RF-DETR का उपयोग करके एक मजबूत foundation से शुरू होता है, जो अपने backbone में अधिक world knowledge शामिल करता है। इसके बाद, NAS architecture को आपके dataset के अनुसार tailor करता है — उदाहरण के लिए, अगर आपके data को कम decoder layers वाले model से फायदा होता है, तो NAS उस architecture को स्वतः खोजकर deliver कर सकता है.

## समर्थित tasks और ज्ञात limitations

NAS वर्तमान में support करता है:

* Object Detection
* Instance Segmentation

अन्य वर्तमान limitations:

* Raw weights (`.pt`, `.onnx`, आदि) को third-party inference servers पर उपयोग के लिए download नहीं किया जा सकता। NAS models Roboflow Serverless Hosted API, Dedicated Deployments, Workflows, Batch Processing, और self-hosted पर चलते हैं [Roboflow Inference](https://inference.roboflow.com/install/). NAS weights को download और run करने के लिए, हम Roboflow Inference की recommend करते हैं.
* NAS द्वारा खोजे गए model weights Roboflow के [Platform Model License](https://roboflow.com/platform-model-license-1-0), जिसके लिए आवश्यक है कि आपका Roboflow account अच्छी स्थिति में हो.

## NAS training run शुरू करें

{% stepper %}
{% step %}
**Train tab खोलें और Neural Architecture Search engine चुनें**

अपने project में Train tab खोलें (यहाँ: `https://app.roboflow.com/YOUR_WORKSPACE/YOUR_PROJECT_NAME/train`) और चुनें **Neural Architecture Search** engine.

<figure><img src="/files/ba519c5697c139cd726b1f32af1ea536bfbe5469" alt="Train tab engine selector with Neural Architecture Search highlighted."><figcaption><p>Train tab पर Neural Architecture Search engine चुनें.</p></figcaption></figure>
{% endstep %}

{% step %}
**एक backbone चुनें**

जिन project types में multiple model variants होते हैं (जैसे, object detection में Standard और Plus), आगे बढ़ने से पहले आपको एक backbone चुनना होगा। अपने use case के अनुरूप variant पर क्लिक करें। जिन project types में single variant होता है (जैसे, instance segmentation), वह स्वतः select हो जाता है.
{% endstep %}

{% step %}
**एक dataset version चुनें या बनाएँ**

एक मौजूदा dataset version चुनें या नया बनाएँ। कुछ tips:

* NAS training के लिए अपने dataset में augmentations जोड़ने की हम अनुशंसा नहीं करते.
* आपके validation split में कम से कम **15 images**. NAS को एक stable Pareto frontier खोजने के लिए पर्याप्त validation data चाहिए; API 15 validation images से कम वाले training requests को reject कर देगा.

<figure><img src="/files/994580b4cc1ab357ab4f200164c719da11248f0c" alt="Dataset version selector for a NAS training run."><figcaption><p>अपने NAS run के लिए एक dataset version चुनें या बनाएँ.</p></figcaption></figure>
{% endstep %}

{% step %}

#### एक backbone चुनें (सिर्फ object detection)

Object detection projects के लिए, आप दो backbone options में से चुन सकते हैं:

* **Standard** - तेज training, तेज models खोजता है। तब सबसे अच्छा जब आप edge devices पर deploy करने की योजना बना रहे हों.
* **Plus** - अधिक accurate models खोजता है। तब सबसे अच्छा जब आप cloud GPUs के साथ deploy करने की योजना बना रहे हों.

Instance segmentation projects एक single backbone का उपयोग करते हैं और इस step को छोड़ देते हैं.
{% endstep %}

{% step %}
**Training शुरू करें**

क्लिक करें **Training शुरू करें** run शुरू करने के लिए.

<figure><img src="/files/2c08d764d2f4bb3bb5c86fb63e2d425aee18004f" alt="Start Training button on the NAS configuration page."><figcaption><p>Configuration page से NAS run शुरू करें.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## NAS results page को पढ़ना

<figure><img src="/files/c57a18d202c9f2223d59663c934f463ade6ab176" alt="NAS results page with purple dots representing trained models along the Pareto frontier."><figcaption><p>हर purple dot एक fully trained model है जो deployment के लिए उपलब्ध है.</p></figcaption></figure>

Results page आपके data पर NAS द्वारा mined और trained किए गए हर model को Pareto frontier के along plot करके दिखाती है — हर latency point पर खोजा गया सबसे अच्छा model। हर purple dot एक fully trained model है जिसे आप deploy कर सकते हैं। Mining के आगे बढ़ने के साथ frontier live अपडेट होता रहता है, इसलिए आप full run पूरा होने से पहले ही candidates का मूल्यांकन शुरू कर सकते हैं.

**एक metric चुनना.** F1, mAP\@50, और mAP\@50:95 के बीच switch करें ताकि frontier का मूल्यांकन उस metric के मुकाबले कर सकें जो आपके use case के लिए महत्वपूर्ण है। अलग-अलग metrics के लिए frontier पर अलग models दिखाई दे सकते हैं — यह अपेक्षित है। उस metric को चुनें जो production में model का मूल्यांकन करने के तरीके के सबसे करीब हो, फिर अपने target latency पर सबसे अच्छा model चुनें। अधिकांश use cases के लिए हम F1 की recommend करते हैं.

**Models को star करना.** जिन models का आप उपयोग करना चाहते हैं, उन्हें star करें। Star किए गए models Workflow model picker में दिखाई देते हैं; unstar किए गए models results page पर बने रहते हैं लेकिन picker में नहीं दिखते ताकि वह साफ-सुथरा रहे। जितने चाहें उतने models star करें — starring free है और reversible है.

**Star किए गए model का उपयोग करना.** Workflow में model block का उपयोग करके इसे चुनें, ठीक वैसे ही जैसे किसी अन्य Roboflow model को चुनते हैं.

Run के दौरान NAS द्वारा दिखाई जाने वाली live training charts (Training Progress Band और Epoch Snapshot views) के बारे में अधिक जानकारी के लिए, देखें [Training Results देखें](/roboflow/roboflow-hi/train/training-results.md).

## NAS run रोकना

एक NAS job के दो phases होते हैं — **training** और **mining** — जो उसी job में back-to-back चलते हैं। Run रोकने के आपके पास दो तरीके हैं:

* **जल्दी रोकें** (जब आप current frontier से संतुष्ट हों, तब अनुशंसित). Phase के अनुसार "Stop Training Early" या "Stop Mining" पर क्लिक करें। उस बिंदु तक mined किए गए models रखे जाते हैं और deploy किए जा सकते हैं। पूरा किए गए काम के लिए उपयोग किए गए credits का billing होता है। देखें [Early Stopping](/roboflow/roboflow-hi/train/stop-training-early.md) विवरण के लिए.
* **रद्द करें** (जब आप run को पूरी तरह छोड़ना चाहते हों). "Cancel Training." पर क्लिक करें। कोई weights save नहीं होते, लेकिन अगर आप job के शुरुआती चरण में cancel करते हैं तो credits वापस कर दिए जाते हैं। देखें [Training Job रद्द करें](/roboflow/roboflow-hi/train/cancel-a-training-job.md).

{% hint style="info" %}
जब model converge हो जाता है — यानी सभी target epochs पूरे होने से पहले peak performance तक पहुंच जाता है — तब NAS runs अपने आप भी रुक जाते हैं। Results page पर एक banner बताता है कि ऐसा हुआ है। आपकी ओर से कोई action आवश्यक नहीं है.
{% endhint %}

## NAS-discovered models को deploy करना

NAS-discovered models को भी किसी अन्य Roboflow-trained model की तरह ही deploy किया जाता है। आप उन्हें इन पर चला सकते हैं:

* **Roboflow Serverless Hosted API** (नीचे code examples देखें).
* **Dedicated Deployments** higher throughput या reserved capacity के लिए.
* **Workflows** और **Batch Processing** vision pipelines बनाने और चलाने के लिए.
* **Self-hosted** [**Roboflow Inference**](https://inference.roboflow.com/install/) अपने hardware पर (Docker, edge, या cloud).

### Roboflow Inference के साथ NAS models को locally चलाना

इसे install और start करें [Roboflow Inference](https://inference.roboflow.com/install/) अपने hardware पर, फिर `inference-sdk` को `http://localhost:9001` और अपने NAS model ID के साथ इसे वैसे ही call करें जैसे आप किसी अन्य Roboflow model के साथ करते हैं। नीचे दिए गए code examples hosted endpoint और local Inference server, दोनों पर काम करते हैं — बस बदल दें `api_url`.

### Roboflow Serverless Hosted API

{% tabs %}
{% tab title="Python (requests)" %}

```python
import base64

import requests

API_KEY = "roboflow-API-KEY"
MODEL_ID = "your-workspace/the-model-id-here"
IMAGE_PATH = "your_image_path.png"

with open(IMAGE_PATH, "rb") as f:
    image_data = base64.b64encode(f.read()).decode("utf-8")

response = requests.post(
    f"https://serverless.roboflow.com/{MODEL_ID}",
    params={"api_key": API_KEY},
    headers={"Content-Type": "application/x-www-form-urlencoded"},
    data=image_data,
)

print(response.json())
```

{% endtab %}

{% tab title="Python (inference-sdk)" %}
Dependencies इंस्टॉल करने के लिए, `pip install inference-sdk`.

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key="roboflow-API-KEY"
)

result = CLIENT.infer("your_image_path.png", model_id="your-workspace/the-model-id-here")
print(result)
```

{% endtab %}

{% tab title="cURL" %}
**Linux या MacOS**

स्थानीय फ़ाइल जिसका नाम है, उसके लिए JSON predictions प्राप्त करना `your_image_path.png`:

```bash
base64 your_image_path.png | curl -d @- \\
"https://serverless.roboflow.com/your-workspace/the-model-id-here?api_key=roboflow-API-KEY"
```

वेब पर कहीं और होस्ट की गई image पर उसके URL के माध्यम से inference चलाना (न भूलें [इसे URL encode करें](https://www.urlencoder.org/)):

```bash
curl -X POST "https://serverless.roboflow.com/your-workspace/the-model-id-here?\\
api_key=roboflow-API-KEY&\\
image=https%3A%2F%2Fi.imgur.com%2FPEEvqPN.png"
```

{% endtab %}

{% tab title="JavaScript" %}
**Node.js**

हम उपयोग कर रहे हैं [axios](https://github.com/axios/axios) इस उदाहरण में POST request करने के लिए, इसलिए पहले चलाएँ `npm install axios` ताकि dependency इंस्टॉल हो जाए।

**स्थानीय image पर inference चलाना**

```javascript
const axios = require("axios");
const fs = require("fs");

const image = fs.readFileSync("your_image_path.png", {
    encoding: "base64"
});

axios({
    method: "POST",
    url: "https://serverless.roboflow.com/your-workspace/the-model-id-here",
    params: {
        api_key: "roboflow-API-KEY"
    },
    data: image,
    headers: {
        "Content-Type": "application/x-www-form-urlencoded"
    }
})
.then(function(response) {
    console.log(response.data);
})
.catch(function(error) {
    console.log(error.message);
});
```

**URL के माध्यम से वेब पर कहीं और होस्ट की गई image पर inference चलाना**

```javascript
const axios = require("axios");

axios({
    method: "POST",
    url: "https://serverless.roboflow.com/your-workspace/the-model-id-here",
    params: {
        api_key: "roboflow-API-KEY",
        image: "https://i.imgur.com/PEEvqPN.png"
    }
})
.then(function(response) {
    console.log(response.data);
})
.catch(function(error) {
    console.log(error.message);
});
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/train/neural-architecture-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
