Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- Raziel1234/Duchifat-2
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- computer-use
|
| 10 |
+
- code
|
| 11 |
+
- agent
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Duchifat-2-Computer-v1 🕊️💻
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
## Overview
|
| 19 |
+
**Duchifat-2-Computer-v1** is a high-precision, specialized Small Language Model (SLM) with **136M parameters**. This model is a fine-tuned version of the base `Duchifat-2`, specifically engineered for **Task-Oriented Control** and **CLI Automation**.
|
| 20 |
+
|
| 21 |
+
Through aggressive Supervised Fine-Tuning (SFT) and "Hard Alignment," we have eliminated general-purpose hallucinations (such as irrelevant PDF/Video references) to create a reliable bridge between natural language instructions and executable computer actions.
|
| 22 |
+
|
| 23 |
+
## 🤖 The Core Engine of CLI-Assistant
|
| 24 |
+
This model is designed to function as the primary reasoning engine for the **CLI-Assistant** project. It transforms human intent into structured tool-calls with near-zero latency.
|
| 25 |
+
|
| 26 |
+
🔗 **To see the full implementation and integrate this model into your system, visit:**
|
| 27 |
+
👉 [CLI-Agent on GitHub](https://github.com/nevo398/CLI-Agent)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Key Features
|
| 32 |
+
- **Deterministic Alignment:** Optimized for precise tool-calling formats (e.g., `[SAY_TEXT]`, `[CREATE_NOTE]`).
|
| 33 |
+
- **Ultra-Lightweight:** 136M parameters allow for lightning-fast inference on CPU/Edge devices or low-cost API endpoints.
|
| 34 |
+
- **Context-Aware:** Understands complex instructions involving times, dates, and nested technical content.
|
| 35 |
+
- **Zero-Hallucination:** Drastically reduced pre-training bias to ensure the model stays within the "Computer Action" domain.
|
| 36 |
+
|
| 37 |
+
## 🛠️ Usage & Prompt Template
|
| 38 |
+
To achieve the best results, the model must be prompted using the following format:
|
| 39 |
+
|
| 40 |
+
```text
|
| 41 |
+
<instruction> {Your Command Here} </instruction>
|
| 42 |
+
<assistant>
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Example
|
| 46 |
+
|
| 47 |
+
# User input:
|
| 48 |
+
```Say 'The backup is complete'```
|
| 49 |
+
|
| 50 |
+
# Model Output:
|
| 51 |
+
```[SAY_TEXT]("The backup is complete")```
|
| 52 |
+
|
| 53 |
+
## Quick Start(Inference)
|
| 54 |
+
```python
|
| 55 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
+
import torch
|
| 57 |
+
|
| 58 |
+
model_id = "Raziel1234/Duchifat-2-Computer-v1"
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 60 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda")
|
| 61 |
+
|
| 62 |
+
prompt = "<instruction> Say 'The backup is complete' </instruction>\n<assistant> "
|
| 63 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 64 |
+
|
| 65 |
+
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=False)
|
| 66 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Training Details
|
| 70 |
+
- **Base Model**: Duchifat-2(Pre-trained on 3.27B tokens)
|
| 71 |
+
- **SFT Technique**: High-LR Hard Alignment (1e-4)
|
| 72 |
+
- **Epochs:** 80 (Aggressive Alignment)
|
| 73 |
+
- **Hardware**: Trained on T4 via Google Colab.
|
| 74 |
+
|
| 75 |
+
## LICENSE
|
| 76 |
+
|
| 77 |
+
This model is released under the Apache 2.0 License. Please refer to the [CLI-Agent on GitHub](https://github.com/nevo398/CLI-Agent) repository for additional integration guidelines.
|
| 78 |
+
|