Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: THUDM/glm-4-9b-chat
|
| 4 |
+
tags:
|
| 5 |
+
- glm
|
| 6 |
+
- glm-4
|
| 7 |
+
- text-generation
|
| 8 |
+
- fine-tuned
|
| 9 |
+
- custom
|
| 10 |
+
- bagent
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# bagent-maxxl (GLM Fine-Tuned Brain)
|
| 14 |
+
|
| 15 |
+
Welcome to **bagent-maxxl**, a customized high-intelligence LLM built on top of the state-of-the-art **GLM-4 (9B Chat)** architecture.
|
| 16 |
+
|
| 17 |
+
## Model Highlights
|
| 18 |
+
- **Base Architecture:** `THUDM/glm-4-9b-chat` (Bilingual Chinese/English architecture, excellent reasoning capabilities)
|
| 19 |
+
- **Fine-Tuning Method:** LoRA (Parameter-Efficient Fine-Tuning)
|
| 20 |
+
- **Specialized Tasks:** Optimized for structured coding, rich UI/UX element generation, automated research validation, and custom instruction compliance.
|
| 21 |
+
|
| 22 |
+
## Intended Use Cases
|
| 23 |
+
This model is designed to behave as a powerful, self-aware coding companion and UI builder assistant. It excels at:
|
| 24 |
+
1. Generating clean, modern HTML/CSS styles (glassmorphism, neumorphism, gradients).
|
| 25 |
+
2. Writing asynchronous Python, JavaScript classes, and optimized database queries.
|
| 26 |
+
3. Breaking down complex problems with systematic validation.
|
| 27 |
+
|
| 28 |
+
## How to Use the Model
|
| 29 |
+
|
| 30 |
+
You can load and run inference on this model directly using standard `transformers`:
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 34 |
+
import torch
|
| 35 |
+
|
| 36 |
+
model_id = "OraXDev/bagent-maxxl"
|
| 37 |
+
|
| 38 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 39 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 40 |
+
model_id,
|
| 41 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
| 42 |
+
device_map="auto",
|
| 43 |
+
trust_remote_code=True
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
prompt = """
|
| 47 |
+
### Instruction:
|
| 48 |
+
Create a beautiful glassmorphic contact form with animated floating input labels.
|
| 49 |
+
|
| 50 |
+
### Input:
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### Response:
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 57 |
+
with torch.no_grad():
|
| 58 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 59 |
+
|
| 60 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 61 |
+
```
|