Instructions to use ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ThakiCloud/Qwen3.8-27B-Human-KO") model = PeftModel.from_pretrained(base_model, "ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA") - Notebooks
- Google Colab
- Kaggle
Add LoRA adapter(s) behind ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1
Browse files- MODEL_CARD.ko.md +42 -0
- README.md +55 -0
- adapter_config.json +55 -0
- adapter_model.safetensors +3 -0
MODEL_CARD.ko.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA
|
| 2 |
+
|
| 3 |
+
🇺🇸 English card: [README.md](./README.md)
|
| 4 |
+
|
| 5 |
+
이 repo에는 [ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1)를 만들 때 병합한 LoRA adapter 가중치가 들어 있습니다.
|
| 6 |
+
학습을 재현하거나, 병합 가중치 대신 adapter 형태로 불러 쓰려는 분을 위해 공개합니다.
|
| 7 |
+
용도, 학습 데이터, 평가, 한계는 병합 모델 카드에 정리되어 있고 이 repo는 그 내용을 바꾸지 않습니다.
|
| 8 |
+
|
| 9 |
+
## 단계
|
| 10 |
+
|
| 11 |
+
| # | 단계 | 위치 | 학습 기준 모델 | r / alpha |
|
| 12 |
+
|---|---|---|---|---|
|
| 13 |
+
| 1 | human-ko-sft | [ThakiCloud/Qwen3.8-27B-Human-KO-LoRA](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-LoRA) | 해당 repo 참고 | 해당 repo 참고 |
|
| 14 |
+
| 2 | enterprise-sft | repo 최상위 | `ThakiCloud/Qwen3.8-27B-Human-KO` | 8 / 16 |
|
| 15 |
+
|
| 16 |
+
위 순서대로 적용합니다. 각 단계는 앞 단계까지 반영한 모델 위에서 학습했습니다.
|
| 17 |
+
|
| 18 |
+
## 사용법
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
import torch
|
| 22 |
+
from transformers import AutoModelForCausalLM
|
| 23 |
+
from peft import PeftModel
|
| 24 |
+
|
| 25 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B", torch_dtype=torch.bfloat16)
|
| 26 |
+
model = PeftModel.from_pretrained(model, "ThakiCloud/Qwen3.8-27B-Human-KO-LoRA").merge_and_unload() # stage 1
|
| 27 |
+
model = PeftModel.from_pretrained(model, "ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA").merge_and_unload() # stage 2: enterprise-sft
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## 맞는 adapter인지 확인한 방법
|
| 31 |
+
|
| 32 |
+
LoRA가 붙는 tensor 4개를 무작위로 골라, 공개된 병합 가중치에서 `ThakiCloud/Qwen3.8-27B-Human-KO`를 뺀 값과 adapter의 변화량(scale x B x A)을 비교했습니다.
|
| 33 |
+
코사인 중앙값은 0.924입니다. 병합 가중치를 bf16으로 저장하면서 생기는 반올림 때문에 1보다 조금 낮습니다. 쓰지 않은 adapter를 넣으면 0 근처가 나옵니다.
|
| 34 |
+
|
| 35 |
+
## 참고
|
| 36 |
+
|
| 37 |
+
- `adapter_config.json`에는 각 단계의 학습 기준이 된 공개 모델 이름을 적었습니다. 학습은 같은 가중치의 로컬 사본으로 했고, adapter 가중치는 바꾸지 않았습니다.
|
| 38 |
+
- Human-KO SFT 다음 단계들은 lm_head 일부 행을 잘라내기 전의 Human-KO 병합본 위에서 학습했습니다. LoRA는 lm_head를 건드리지 않으므로, 공개된 Human-KO 위에 이 adapter를 적용하면 LoRA가 붙는 모든 tensor가 공개 모델과 같아집니다. 공개 모델의 lm_head는 잘라내기 전 상태이므로, 가중치를 비트 단위로 똑같이 쓰려면 병합 repo를 쓰십시오.
|
| 39 |
+
|
| 40 |
+
## 라이선스
|
| 41 |
+
|
| 42 |
+
[ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1)와 같은 `apache-2.0`입니다.
|
README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: ThakiCloud/Qwen3.8-27B-Human-KO
|
| 4 |
+
base_model_relation: adapter
|
| 5 |
+
library_name: peft
|
| 6 |
+
language:
|
| 7 |
+
- ko
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
tags:
|
| 10 |
+
- lora
|
| 11 |
+
- peft
|
| 12 |
+
- thakicloud
|
| 13 |
+
---
|
| 14 |
+
# Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA
|
| 15 |
+
|
| 16 |
+
🇰🇷 Korean card: [MODEL_CARD.ko.md](./MODEL_CARD.ko.md)
|
| 17 |
+
|
| 18 |
+
These are the LoRA adapter weights that were merged to build [ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1).
|
| 19 |
+
They are published so the training can be reproduced, and so the model can be loaded as an adapter instead of as merged weights.
|
| 20 |
+
Intended use, training data, evaluation and limitations are documented on the merged model's card. This repo does not change any of them.
|
| 21 |
+
|
| 22 |
+
## Stages
|
| 23 |
+
|
| 24 |
+
| # | stage | where | trained on | r / alpha |
|
| 25 |
+
|---|---|---|---|---|
|
| 26 |
+
| 1 | human-ko-sft | [ThakiCloud/Qwen3.8-27B-Human-KO-LoRA](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-LoRA) | see that repo | see that repo |
|
| 27 |
+
| 2 | enterprise-sft | repo root | `ThakiCloud/Qwen3.8-27B-Human-KO` | 8 / 16 |
|
| 28 |
+
|
| 29 |
+
Apply the stages in this order. Each stage was trained on the model produced by the previous one.
|
| 30 |
+
|
| 31 |
+
## How to use
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import torch
|
| 35 |
+
from transformers import AutoModelForCausalLM
|
| 36 |
+
from peft import PeftModel
|
| 37 |
+
|
| 38 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B", torch_dtype=torch.bfloat16)
|
| 39 |
+
model = PeftModel.from_pretrained(model, "ThakiCloud/Qwen3.8-27B-Human-KO-LoRA").merge_and_unload() # stage 1
|
| 40 |
+
model = PeftModel.from_pretrained(model, "ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1-LoRA").merge_and_unload() # stage 2: enterprise-sft
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## How we checked these are the right adapters
|
| 44 |
+
|
| 45 |
+
For 4 randomly chosen LoRA target tensors we compared the published merged weights minus `ThakiCloud/Qwen3.8-27B-Human-KO` with the adapter deltas (scale x B x A).
|
| 46 |
+
The median cosine is 0.924. Rounding the merged weights to bf16 keeps it below 1; an adapter that was not used scores about 0.
|
| 47 |
+
|
| 48 |
+
## Notes
|
| 49 |
+
|
| 50 |
+
- `adapter_config.json` names the public model each stage was trained on. Training used a local copy of the same weights, and the adapter weights are unchanged.
|
| 51 |
+
- Stages after the Human-KO SFT were trained on the Human-KO merge before its lm_head row prune. The LoRA does not touch lm_head, so on the public Human-KO these adapters reproduce every LoRA-targeted tensor of the published model; the published model keeps the unpruned lm_head, so use the merged repo for bit-exact weights.
|
| 52 |
+
|
| 53 |
+
## License
|
| 54 |
+
|
| 55 |
+
Same as [ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1](https://huggingface.co/ThakiCloud/Qwen3.8-27B-Human-KO-Enterprise-v0.1): `apache-2.0`.
|
adapter_config.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "ThakiCloud/Qwen3.8-27B-Human-KO",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 16,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"monteclora_config": null,
|
| 27 |
+
"peft_type": "LORA",
|
| 28 |
+
"peft_version": "0.20.0",
|
| 29 |
+
"qalora_group_size": 16,
|
| 30 |
+
"r": 8,
|
| 31 |
+
"rank_pattern": {},
|
| 32 |
+
"revision": null,
|
| 33 |
+
"target_modules": [
|
| 34 |
+
"in_proj_qkv",
|
| 35 |
+
"in_proj_z",
|
| 36 |
+
"in_proj_b",
|
| 37 |
+
"in_proj_a",
|
| 38 |
+
"v_proj",
|
| 39 |
+
"down_proj",
|
| 40 |
+
"q_proj",
|
| 41 |
+
"gate_proj",
|
| 42 |
+
"up_proj",
|
| 43 |
+
"k_proj",
|
| 44 |
+
"o_proj",
|
| 45 |
+
"out_proj"
|
| 46 |
+
],
|
| 47 |
+
"target_parameters": null,
|
| 48 |
+
"task_type": "CAUSAL_LM",
|
| 49 |
+
"trainable_token_indices": null,
|
| 50 |
+
"use_bdlora": null,
|
| 51 |
+
"use_dora": false,
|
| 52 |
+
"use_qalora": false,
|
| 53 |
+
"use_rslora": false,
|
| 54 |
+
"velora_config": null
|
| 55 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6b856662a4da1cc3d82d7bfacc785b3e814cc81392e3864b3a3ab05e9e9601e
|
| 3 |
+
size 233590600
|