Instructions to use MightyDragon-Dev/language-dragon-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use MightyDragon-Dev/language-dragon-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("gpt2") model = PeftModel.from_pretrained(base_model, "MightyDragon-Dev/language-dragon-lora") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
---
|
| 3 |
language:
|
| 4 |
- zh
|
|
@@ -10,68 +9,42 @@ tags:
|
|
| 10 |
- aviation
|
| 11 |
- slm
|
| 12 |
- mobile-ai
|
|
|
|
| 13 |
model_name: Language Dragon LoRA v1.1
|
| 14 |
-
base_model: gpt2
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
library_name: peft
|
| 17 |
---
|
| 18 |
|
| 19 |
# 🐉 Language Dragon LoRA (v1.1)
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
Language Dragon is a high-precision **Small Language Model (SLM)** specialized for the aerospace industry and bilingual tasks (English & Chinese). While most models are "oceans," the Dragon is the **Changjiang**—deep, specialized, and essential for its niche.
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
-
## 🚀
|
| 30 |
-
We are currently destroying the "concrete wall" of hardware limitations. Every download and supporter brings us closer to the ultimate aviation training rig.
|
| 31 |
-
|
| 32 |
| Goal | Reward Unlocked | Current Status |
|
| 33 |
| :--- | :--- | :--- |
|
| 34 |
-
| **50 Pilots** |
|
| 35 |
-
| **500 Pilots** | Release "Language Dragon 7B" (Llama 3 base). | *Planned* |
|
| 36 |
-
| **1,000 Pilots** |
|
| 37 |
-
|
| 38 |
-
---
|
| 39 |
-
|
| 40 |
-
## 🛠️ Technical Specifications
|
| 41 |
-
* **Base Model:** GPT-2 (124M)
|
| 42 |
-
* **Adapter Type:** LoRA (Rank 16)
|
| 43 |
-
* **Dataset:** TinyStories-ZH + Aviation-Expert Mix (Bilingual)
|
| 44 |
-
* **Hardware Target:** Optimized for CPU inference and 4GB-8GB VRAM GPUs.
|
| 45 |
|
| 46 |
---
|
| 47 |
|
| 48 |
-
##
|
| 49 |
-
|
| 50 |
|
| 51 |
```python
|
| 52 |
-
# Recommended settings for Language Dragon:
|
| 53 |
-
outputs = model.generate(
|
| 54 |
-
**inputs,
|
| 55 |
-
max_new_tokens=200,
|
| 56 |
-
repetition_penalty=1.5, # Prevents loops
|
| 57 |
-
no_repeat_ngram_size=3, # Block 3-word repeats
|
| 58 |
-
temperature=0.4, # Lower = More factual
|
| 59 |
-
top_p=0.9
|
| 60 |
-
)
|
| 61 |
-
#🧪 Quick Start (Test Flight)
|
| 62 |
-
#Copy and paste this into your local environment to run the Dragon on your CPU:
|
| 63 |
-
|
| 64 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 65 |
from peft import PeftModel
|
| 66 |
|
| 67 |
-
# 1. Load the base engine
|
| 68 |
model = AutoModelForCausalLM.from_pretrained("gpt2")
|
| 69 |
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
| 70 |
-
|
| 71 |
-
# 2. Snap on the Dragon Wings
|
| 72 |
model = PeftModel.from_pretrained(model, "MightyDragon-Dev/language-dragon-lora")
|
| 73 |
|
| 74 |
-
#
|
| 75 |
prompt = "歼-20 (Mighty Dragon) 在广东领空开启了加力燃烧室 (Afterburners)。由于 DSI 进气道的设计,它在超音速巡航时保持了极低的雷达散射截面 (RCS)。突然,预警机发出了警报"
|
| 76 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 77 |
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- zh
|
|
|
|
| 9 |
- aviation
|
| 10 |
- slm
|
| 11 |
- mobile-ai
|
| 12 |
+
- peft
|
| 13 |
model_name: Language Dragon LoRA v1.1
|
| 14 |
+
base_model: openai-community/gpt2
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
library_name: peft
|
| 17 |
---
|
| 18 |
|
| 19 |
# 🐉 Language Dragon LoRA (v1.1)
|
| 20 |
|
| 21 |
+
"Powerful enough to lead. Small enough to hide."
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
Language Dragon is a high-precision Small Language Model (SLM) specialized for the aerospace industry and bilingual tasks. Optimized for "Edge AI" on devices like the **Surface Pro (i5-10210U)**.
|
| 24 |
|
| 25 |
---
|
| 26 |
|
| 27 |
+
## 🚀 Roadmap to the $5,000 Powerhouse (RTX 5090)
|
|
|
|
|
|
|
| 28 |
| Goal | Reward Unlocked | Current Status |
|
| 29 |
| :--- | :--- | :--- |
|
| 30 |
+
| **50 Pilots** | Post detailed [J-20 vs. F-22] story sample. | **84% (42/50)** |
|
| 31 |
+
| **500 Pilots** | Release the "Language Dragon 7B" (Llama 3 base). | *Planned* |
|
| 32 |
+
| **1,000 Pilots** | Pre-orders open for the "Pro" 5090 Weights. | *Future* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
+
## 🧪 Test Flight (Python Sample)
|
| 37 |
+
Run this directly on your CPU to see the Dragon in action:
|
| 38 |
|
| 39 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 41 |
from peft import PeftModel
|
| 42 |
|
|
|
|
| 43 |
model = AutoModelForCausalLM.from_pretrained("gpt2")
|
| 44 |
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
|
|
|
|
|
|
| 45 |
model = PeftModel.from_pretrained(model, "MightyDragon-Dev/language-dragon-lora")
|
| 46 |
|
| 47 |
+
# The Combat Alert Test:
|
| 48 |
prompt = "歼-20 (Mighty Dragon) 在广东领空开启了加力燃烧室 (Afterburners)。由于 DSI 进气道的设计,它在超音速巡航时保持了极低的雷达散射截面 (RCS)。突然,预警机发出了警报"
|
| 49 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 50 |
|