मुख्य सामग्री पर जाएं
प्रशिक्षण मार्गदर्शिका के अध्याय सभी दस्तावेज़

TrainingProject कॉन्फ़िगरेशन और वर्कफ़्लो

SDK 0.2.0 का उद्देश्य-आधारित प्रशिक्षण, मूल्यांकन, रिकवरी और एक्सपोर्ट अनुबंध।

प्रशिक्षण मार्गदर्शिका के अध्याय

हर भाषा में कमांड और कोड अंग्रेज़ी में ही रहेंगे। बड़े अक्षरों वाले प्लेसहोल्डर को अपने खाते और भुगतान किए गए कार्य के मानों से बदलें; साझा नोटबुक या लॉग में असली कुंजियाँ न डालें।

TrainingProject का वर्कफ़्लो

एक प्रोजेक्ट कॉन्फ़िगरेशन योजना, ट्रेनिंग, मूल्यांकन और एक्सपोर्ट संभालती है।
  1. प्रोजेक्ट मॉडल, उद्देश्य और डेटा नीति
  2. योजना अनुकूलता, पाठ्यक्रम और बजट
  3. रन डेटा, ट्रेनिंग और चेकपॉइंट
  4. सुधार विषय और गिरावट का सीमित मूल्यांकन
  5. एक्सपोर्ट जाँची हुई मॉडल फ़ाइल और दोहराने योग्य रिपोर्ट

प्रोजेक्ट: मॉडल, उद्देश्य और डेटा नीति. योजना: अनुकूलता, पाठ्यक्रम और बजट. रन: डेटा, ट्रेनिंग और चेकपॉइंट. सुधार: विषय और गिरावट का सीमित मूल्यांकन. एक्सपोर्ट: जाँची हुई मॉडल फ़ाइल और दोहराने योग्य रिपोर्ट

एक प्रोजेक्ट, एक दोहराने योग्य कॉन्फ़िगरेशन

प्रोजेक्ट कॉन्फ़िगरेशन स्थानीय विद्यार्थी मॉडल, सशुल्क शिक्षक संदर्भ, उद्देश्य, डेटा नीति, रनटाइम, पाठ्यक्रम और मूल्यांकन रूब्रिक को एक साथ बाँधता है। Automatic मोड संगत डिफ़ॉल्ट चुनता है; Advanced मोड समर्थित नियंत्रण देता है। प्रशिक्षण से पहले dry-run प्लान मॉडल अनुकूलता, विषयों, डेटा प्रवाह, बजट, फ़िंगरप्रिंट और अपेक्षित फ़ाइलों का विवरण देता है।

  • Python प्रोजेक्ट API और fpai-training CLI एक ही इंजन इस्तेमाल करते हैं।
  • मॉडल, डेटा, मूल्यांकनकर्ता और कॉन्फ़िगरेशन के सभी पथ प्रोजेक्ट रूट के भीतर जाँचे जाते हैं।
  • Custom evaluator के संस्करण पिन करें और रन manifests सुरक्षित रखें।
उदाहरण · json
{
  "schema_version": "1.0",
  "mode": "automatic",
  "objective": "Classify support messages as billing, account_access or technical_issue.",
  "model": {"path": "./models/student", "adapter": "transformers-causal-lm", "revision": null},
  "teacher": {"provider": "openai", "reference_model_id": 123},
  "data": {
    "sources": ["./data/train.jsonl"], "teacher_sharing": "none",
    "validation_path": "./data/validation.jsonl", "test_path": "./data/test.jsonl",
    "deduplicate": true, "seed": 42
  },
  "runtime": {"target": "customer_datacenter", "devices": "auto"},
  "training": {"method": "auto"},
  "curriculum": {"topics": ["intent", "ambiguous_requests", "class_balance"], "max_improvement_cycles": 3, "stop_on_regression": true},
  "budgets": {"max_training_minutes": 120, "max_teacher_requests": 1000, "max_storage_gib": 20},
  "checkpoints": {"keep_last": 3},
  "evaluation": {"rubric": "./rubric.json", "baseline_required": true},
  "output": {"directory": "./runs/german-001", "format": "safetensors"}
}
उदाहरण · json
{
  "schema_version": "1.0",
  "mode": "advanced",
  "model": {"path": "./models/student", "adapter": "transformers-causal-lm", "revision": null},
  "teacher": {"provider": "openai", "reference_model_id": 123},
  "objective": "Classify support messages as billing, account_access or technical_issue.",
  "data": {"sources": ["./data/train.jsonl"], "teacher_sharing": "none", "validation_path": "./data/validation.jsonl", "test_path": "./data/test.jsonl"},
  "runtime": {"target": "customer_datacenter", "devices": [0, 1], "distributed": {"backend": "ddp", "nodes": 1}},
  "training": {
    "method": "LoRA",
    "epochs": 3,
    "learning_rate": 0.0002,
    "batch_size": 1,
    "gradient_accumulation_steps": 16,
    "max_sequence_length": 2048,
    "precision": "bf16",
    "lora": {"rank": 16, "alpha": 32, "dropout": 0.05}
  },
  "curriculum": {
    "topics": ["intent", "ambiguous_requests", "class_balance"],
    "max_improvement_cycles": 3,
    "stop_on_regression": true
  },
  "checkpoints": {"every_steps": 100, "keep_last": 3, "resume_validation": "strict"},
  "budgets": {"max_training_minutes": 120, "max_teacher_requests": 1000, "max_storage_gib": 20},
  "evaluation": {"rubric": "./rubric.json", "baseline_required": true},
  "output": {"directory": "./runs/german-advanced-001", "format": "safetensors"}
}
उदाहरण · bash
fpai-training init --directory ./german-project
fpai-training doctor --config ./german-project/training.json
fpai-training plan --config ./german-project/training.json --dry-run
fpai-training run --config ./german-project/training.json
fpai-training status --run ./german-project/runs/german-001
fpai-training pause --run ./german-project/runs/german-001
fpai-training resume --run ./german-project/runs/german-001
fpai-training cancel --run ./german-project/runs/german-001
fpai-training evaluate --run ./german-project/runs/german-001 --split test
fpai-training export --run ./german-project/runs/german-001 --format safetensors
# init creates a project; doctor checks local compatibility; plan makes no teacher call.
# run requires current paid reference access, enforces budgets and trains locally.
# pause saves a checkpoint; resume verifies project fingerprints; cancel is terminal.
# evaluate reads local held-out rows; export validates the accepted local artifact.
उदाहरण · python
import os
from fusionpointai_training import TrainingProject

project = TrainingProject.from_file(
    "./german-project/training.json",
    api_key=os.environ["FUSIONPOINTAI_API_KEY"],
)
plan = project.plan(dry_run=True)
result = project.run()
evaluation = project.evaluate(split="test")
artifact = project.export(format="safetensors")
# Related controls: project.status(), project.pause(), project.resume(), project.cancel().

प्रशिक्षण और मूल्यांकन का व्यवहार

Transformers causal-language-model adapter संगत मॉडल और रनटाइम के लिए वास्तविक SFT, LoRA या QLoRA अनुकूलन करता है। प्रोजेक्ट सशुल्क शिक्षक पहुँच, स्थानीय डेटा, विषय-आधारित मूल्यांकन, क्षमता में गिरावट की जाँच और सीमित सुधार का समन्वय करता है। असमर्थित संरचना, हार्डवेयर या निर्यात संयोजन अनुकूलता जाँच में विफल होते हैं।

  • रुकने के कारणों में accepted, budget_exhausted, no_progress, regression, cancelled और failed शामिल हैं।
  • Native checkpoints और रन स्थिति निजी, स्वामित्व वाले रन स्टोरेज में रखे जाते हैं।
  • शिक्षक से साझा करना प्रोजेक्ट नीति के अनुसार है; validation और final-test डेटा स्थानीय रहता है।
उदाहरण · json
{
  "schema_version": "1.0",
  "name": "support-category-evaluation",
  "scale": {"minimum": 0.0, "maximum": 1.0},
  "criteria": [
    {"id": "support_category", "description": "Match the expected support category.", "metric": "macro_f1", "minimum_score": 0.85}
  ],
  "regression": {"maximum_score_drop": 0.02},
  "final_test": {"path": "./data/test.jsonl", "allow_training_use": false}
}
उदाहरण · text
SDK 0.2.0 CLI AND PROJECT CONTRACT
Configuration/rubric values above are examples, not achieved scores or guarantees.
doctor must reject incompatible architecture, precision, hardware and export settings.
plan --dry-run validates and estimates; it must not update weights or start paid work.
run uses the declared data-sharing policy and enforces all configured budgets.
pause saves a valid atomic checkpoint before stopping owned training workers.
resume validates the checkpoint's model/config/data/evaluator fingerprints.
cancel requests termination of this run's workers; preserve useful logs and artifacts.
evaluate --split test must never feed test examples into training.
export validates files and manifests; never include credentials or unrelated cache files.

Project API:
TrainingProject.from_file(path, *, api_key) -> TrainingProject
plan(*, dry_run=True) -> dict
run() -> dict
status() -> dict
pause() -> dict
resume() -> dict
cancel() -> dict
evaluate(*, split="test") -> dict
export(*, format="safetensors") -> dict

Exit codes:
0 accepted/success; 2 invalid configuration; 3 incompatible runtime/model;
4 authentication/access; 5 budget exhausted; 6 acceptance not met;
7 execution failed; 130 interrupted.
Reports must record stop_reason and unmet criteria, not just an exit code.

रिपोर्ट और मॉडल फ़ाइलों की समीक्षा करें

प्रोजेक्ट रन अपरिवर्तित आधार मॉडल, मापे गए मानदंड, क्षमता में गिरावट, बजट और अधूरी ज़रूरतें दर्ज करता है। Export स्थानीय मॉडल या adapter फ़ाइलों की जाँच करके manifests लिखता है। SDK का व्यवहार संगत सॉफ़्टवेयर और हार्डवेयर पर निर्भर है; इन उदाहरणों से हार्डवेयर benchmark या अनुमान-नतीजे का दावा नहीं होता।

  • प्रशिक्षण भर से शिक्षक के बराबर क्षमता का दावा नहीं किया जा सकता।
  • दस्तावेज़ के उदाहरण अपने-आप सशुल्क अनुरोध या प्रशिक्षण नहीं चलाते।
  • मॉडल फ़ाइल इस्तेमाल करने से पहले स्थानीय रिपोर्ट और फ़ाइलें देखें।
उदाहरण · text
TrainingProject delivery files
model/                   validated model or adapter weights and tokenizer assets
exports/<format>/        accepted delivery files with a SHA-256 manifest
run-manifest.json        pinned model/data/config/runtime versions
baseline-report.json     untouched student model's measured criteria
evaluation-report.json   final criteria, measured scores and regressions
artifact-manifest.json   safe relative paths, bytes and SHA-256 per file
training-report.json     real steps, timings, budgets and stop reason

Never export credentials, environment files or private cache directories.