Add minimal model card (no training data)
Browse files
README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: skt/A.X-4.0-Light
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
language:
|
| 6 |
+
- ko
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# axlight-4.0-light-merged
|
| 10 |
+
|
| 11 |
+
`skt/A.X-4.0-Light` 를 도메인 적응 파인튜닝한 한국어 생성 모델입니다(LoRA 병합본).
|
| 12 |
+
단독으로 바로 추론에 사용할 수 있습니다.
|
| 13 |
+
|
| 14 |
+
## 사용법
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 18 |
+
import torch
|
| 19 |
+
|
| 20 |
+
tok = AutoTokenizer.from_pretrained("comhu/axlight-4.0-light-merged")
|
| 21 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
+
"comhu/axlight-4.0-light-merged", torch_dtype=torch.bfloat16, device_map="auto")
|
| 23 |
+
|
| 24 |
+
msgs = [{"role": "user", "content": "회사 소개를 한 문단으로 작성해줘."}]
|
| 25 |
+
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 26 |
+
out = model.generate(ids, max_new_tokens=512, do_sample=False)
|
| 27 |
+
print(tok.decode(out[0][len(ids[0]):], skip_special_tokens=True))
|
| 28 |
+
```
|