Instructions to use redche7/qwen3-4b-p300-text-correction-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use redche7/qwen3-4b-p300-text-correction-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507") model = PeftModel.from_pretrained(base_model, "redche7/qwen3-4b-p300-text-correction-lora") - Notebooks
- Google Colab
- Kaggle
Upload Qwen3-4B P300 text correction LoRA checkpoints
Browse files- LICENSE.md +115 -0
- README.md +147 -2
- adapter_config.json +48 -0
- adapter_model.safetensors +3 -0
- checkpoint-1560/adapter_config.json +48 -0
- checkpoint-1560/adapter_model.safetensors +3 -0
- prompt.txt +13 -0
- release_manifest.json +60 -0
- training_config.yaml +38 -0
LICENSE.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# License and mixed-source terms
|
| 2 |
+
|
| 3 |
+
This repository uses the Hugging Face metadata value `license: other` because the
|
| 4 |
+
adapter was trained from sources offered under different licenses. It contains
|
| 5 |
+
PEFT LoRA adapter weights and documentation, but does not redistribute the base
|
| 6 |
+
Qwen model or any training dataset rows.
|
| 7 |
+
|
| 8 |
+
| Source | License | Revision |
|
| 9 |
+
|---|---|---|
|
| 10 |
+
| [Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507) | Apache-2.0 | `cdbee75f17c01a7cc42f958dc650907174af0554` |
|
| 11 |
+
| [RuSentiment](https://github.com/strawberrypie/rusentiment) | CC BY-NC-SA 4.0 | `7f2afa11a9483f5251cd5156ac848d098b502be0` |
|
| 12 |
+
| [Dialogs](https://huggingface.co/datasets/langswap/dialogs-ru-emotional-conversations) | OpenRAIL | `e25ba617b2b56bd1dbf255d3905c51bd8da3d31f` |
|
| 13 |
+
|
| 14 |
+
Subject to all applicable upstream terms, the project author's copyright
|
| 15 |
+
interest, if any, in the adapter weights and model documentation is made
|
| 16 |
+
available under
|
| 17 |
+
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
|
| 18 |
+
No additional permission for commercial use is granted.
|
| 19 |
+
|
| 20 |
+
To the extent that the RuSentiment license applies to the adapter weights or
|
| 21 |
+
their use, recipients must comply with its attribution, non-commercial, and
|
| 22 |
+
share-alike conditions. The legal status of learned adapter weights as
|
| 23 |
+
derivative material and the compatibility of the upstream licenses are not
|
| 24 |
+
asserted. Recipients are responsible for determining whether their intended use
|
| 25 |
+
is permitted.
|
| 26 |
+
|
| 27 |
+
The exact Dialogs OpenRAIL license supplied with the training revision is
|
| 28 |
+
reproduced below because its distribution terms require the license and use
|
| 29 |
+
restrictions to flow down to recipients.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
# Dialogs — OpenRAIL License
|
| 34 |
+
|
| 35 |
+
This dataset ("the Dataset"), and any models or other works trained on or derived
|
| 36 |
+
from it together with their outputs ("Derivatives"), are licensed under an **Open
|
| 37 |
+
& Responsible AI License (OpenRAIL)**, following the BigScience / CreativeML
|
| 38 |
+
OpenRAIL-M template (see https://www.licenses.ai/ and
|
| 39 |
+
https://huggingface.co/blog/open_rail). By accessing or using the Dataset you
|
| 40 |
+
accept these terms.
|
| 41 |
+
|
| 42 |
+
**Licensor:** Ilya Shigabeev and Ilya Latyshev (Langswap).
|
| 43 |
+
|
| 44 |
+
## 1. Grant of rights
|
| 45 |
+
|
| 46 |
+
Subject to the use restrictions in Section 2, the Licensor grants you a
|
| 47 |
+
perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to access,
|
| 48 |
+
use, reproduce, modify, publicly perform, distribute, and redistribute the
|
| 49 |
+
Dataset and Derivatives, for any purpose, **including commercial purposes**.
|
| 50 |
+
|
| 51 |
+
The Licensor claims no rights over Derivatives you create or outputs you
|
| 52 |
+
generate, provided your use complies with Section 2.
|
| 53 |
+
|
| 54 |
+
## 2. Use Restrictions (Attachment A)
|
| 55 |
+
|
| 56 |
+
You agree not to use the Dataset or Derivatives:
|
| 57 |
+
|
| 58 |
+
1. In any way that violates any applicable national, federal, state, local or
|
| 59 |
+
international law or regulation;
|
| 60 |
+
2. For the purpose of exploiting, harming or attempting to exploit or harm
|
| 61 |
+
minors in any way;
|
| 62 |
+
3. To generate or disseminate verifiably false information and/or content with
|
| 63 |
+
the purpose of harming others;
|
| 64 |
+
4. To generate or disseminate personal identifiable information that can be
|
| 65 |
+
used to harm an individual;
|
| 66 |
+
5. To defame, disparage or otherwise harass others;
|
| 67 |
+
6. For fully automated decision making that adversely impacts an individual's
|
| 68 |
+
legal rights or otherwise creates or modifies a binding, enforceable
|
| 69 |
+
obligation;
|
| 70 |
+
7. For any use intended to or which has the effect of discriminating against or
|
| 71 |
+
harming individuals or groups based on online or offline social behavior or
|
| 72 |
+
known or predicted personal or personality characteristics;
|
| 73 |
+
8. To exploit any of the vulnerabilities of a specific group of persons based
|
| 74 |
+
on their age, social, physical or mental characteristics, in order to
|
| 75 |
+
materially distort the behavior of a person pertaining to that group in a
|
| 76 |
+
manner that causes or is likely to cause that person or another person
|
| 77 |
+
physical or psychological harm;
|
| 78 |
+
9. For any use intended to or which has the effect of discriminating against
|
| 79 |
+
individuals or groups based on legally protected characteristics or
|
| 80 |
+
categories;
|
| 81 |
+
10. To provide medical advice and medical results interpretation;
|
| 82 |
+
11. To generate or disseminate information for the purpose to be used for
|
| 83 |
+
administration of justice, law enforcement, immigration or asylum
|
| 84 |
+
processes, such as predicting an individual will commit fraud/crime
|
| 85 |
+
commitment (e.g. by text profiling, drawing causal relationships between
|
| 86 |
+
assertions made in documents, indiscriminate and arbitrarily-targeted use).
|
| 87 |
+
|
| 88 |
+
## 3. Distribution and flow-down
|
| 89 |
+
|
| 90 |
+
If you distribute the Dataset or any Derivative, you must (a) provide a copy of
|
| 91 |
+
this license, including Section 2, to all recipients, and (b) require recipients
|
| 92 |
+
to comply with Section 2. You may add your own terms for your Derivatives
|
| 93 |
+
provided they do not conflict with or weaken these Use Restrictions.
|
| 94 |
+
|
| 95 |
+
## 4. Disclaimer of warranty and liability
|
| 96 |
+
|
| 97 |
+
The Dataset is provided "AS IS", without warranties of any kind, express or
|
| 98 |
+
implied. To the maximum extent permitted by law, the Licensor is not liable for
|
| 99 |
+
any claim, damages, or liability arising from use of the Dataset or Derivatives.
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
*This is an OpenRAIL license (the BigScience/CreativeML OpenRAIL-M template, with
|
| 104 |
+
its standard Attachment A use restrictions, applied to a dataset). On Hugging
|
| 105 |
+
Face this dataset is tagged `license: openrail`. The Dataset's voice actors gave
|
| 106 |
+
written informed consent for open release and lawful use, including commercial
|
| 107 |
+
use.*
|
| 108 |
+
|
| 109 |
+
## Adapter disclaimer
|
| 110 |
+
|
| 111 |
+
THE ADAPTER WEIGHTS AND DOCUMENTATION ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
|
| 112 |
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
|
| 113 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.
|
| 114 |
+
IN NO EVENT SHALL THE PROJECT AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
|
| 115 |
+
LIABILITY ARISING FROM OR RELATED TO THE ADAPTER OR ITS USE.
|
README.md
CHANGED
|
@@ -1,5 +1,150 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: other
|
| 3 |
-
license_name: mixed
|
| 4 |
-
license_link: LICENSE
|
| 5 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 3 |
+
base_model_relation: adapter
|
| 4 |
+
library_name: peft
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- ru
|
| 8 |
+
tags:
|
| 9 |
+
- qwen3
|
| 10 |
+
- peft
|
| 11 |
+
- lora
|
| 12 |
+
- qlora
|
| 13 |
+
- text-correction
|
| 14 |
+
- p300-speller
|
| 15 |
+
datasets:
|
| 16 |
+
- strawberrypie/rusentiment
|
| 17 |
+
- langswap/dialogs-ru-emotional-conversations
|
| 18 |
license: other
|
| 19 |
+
license_name: mixed-source-cc-by-nc-sa-4.0-and-openrail
|
| 20 |
+
license_link: LICENSE.md
|
| 21 |
---
|
| 22 |
+
|
| 23 |
+
# Qwen3-4B P300 Text Correction LoRA
|
| 24 |
+
|
| 25 |
+
Two PEFT LoRA checkpoints fine-tuned from
|
| 26 |
+
[`Qwen/Qwen3-4B-Instruct-2507`](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507)
|
| 27 |
+
for restoring short Russian phrases affected by synthetic character-level
|
| 28 |
+
substitution, adjacent duplication, and deletion noise.
|
| 29 |
+
|
| 30 |
+
The artificial corruption imitates character errors that may occur in decoded
|
| 31 |
+
P300-speller text.
|
| 32 |
+
|
| 33 |
+
## Checkpoints
|
| 34 |
+
|
| 35 |
+
| Hub path | Epoch | Step | Status |
|
| 36 |
+
|---|---:|---:|---|
|
| 37 |
+
| repository root | 1 | 780 | selected default |
|
| 38 |
+
| `checkpoint-1560/` | 2 | 1560 | retained alternative |
|
| 39 |
+
|
| 40 |
+
Checkpoint 780 had lower clean and mixed validation micro CER and fewer
|
| 41 |
+
unnecessary clean modifications. Checkpoint 1560 is included for reproducibility,
|
| 42 |
+
not because it performed better.
|
| 43 |
+
|
| 44 |
+
## Quick start
|
| 45 |
+
|
| 46 |
+
The tokenizer and chat template must be loaded from the pinned base model. To
|
| 47 |
+
use checkpoint 1560, set `adapter_kwargs` to the commented alternative below.
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
from pathlib import Path
|
| 51 |
+
|
| 52 |
+
import torch
|
| 53 |
+
from huggingface_hub import hf_hub_download
|
| 54 |
+
from peft import PeftModel
|
| 55 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
+
|
| 57 |
+
base_id = "Qwen/Qwen3-4B-Instruct-2507"
|
| 58 |
+
base_revision = "cdbee75f17c01a7cc42f958dc650907174af0554"
|
| 59 |
+
adapter_id = "redche7/qwen3-4b-p300-text-correction-lora"
|
| 60 |
+
|
| 61 |
+
tokenizer = AutoTokenizer.from_pretrained(base_id, revision=base_revision)
|
| 62 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 63 |
+
base_id,
|
| 64 |
+
revision=base_revision,
|
| 65 |
+
dtype=torch.bfloat16,
|
| 66 |
+
device_map="auto",
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
adapter_kwargs = {}
|
| 70 |
+
# adapter_kwargs = {"subfolder": "checkpoint-1560"}
|
| 71 |
+
model = PeftModel.from_pretrained(base_model, adapter_id, **adapter_kwargs)
|
| 72 |
+
model.eval()
|
| 73 |
+
|
| 74 |
+
prompt_path = hf_hub_download(adapter_id, "prompt.txt")
|
| 75 |
+
system_prompt = Path(prompt_path).read_text(encoding="utf-8")
|
| 76 |
+
messages = [
|
| 77 |
+
{"role": "system", "content": system_prompt},
|
| 78 |
+
{"role": "user", "content": "ПРИВЕТ, КАК ДИЛА?"},
|
| 79 |
+
]
|
| 80 |
+
inputs = tokenizer.apply_chat_template(
|
| 81 |
+
messages,
|
| 82 |
+
tokenize=True,
|
| 83 |
+
add_generation_prompt=True,
|
| 84 |
+
return_tensors="pt",
|
| 85 |
+
return_dict=True,
|
| 86 |
+
).to(model.device)
|
| 87 |
+
|
| 88 |
+
with torch.inference_mode():
|
| 89 |
+
generated = model.generate(**inputs, do_sample=False, max_new_tokens=160)
|
| 90 |
+
|
| 91 |
+
prompt_length = inputs["input_ids"].shape[1]
|
| 92 |
+
correction = tokenizer.decode(
|
| 93 |
+
generated[0, prompt_length:],
|
| 94 |
+
skip_special_tokens=True,
|
| 95 |
+
).strip()
|
| 96 |
+
print(correction)
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Training
|
| 100 |
+
|
| 101 |
+
The adapters were trained with QLoRA on 22,698 deterministic
|
| 102 |
+
prompt-completion records. Source labels and audio were not used as targets, and
|
| 103 |
+
no training rows are distributed in this model repository.
|
| 104 |
+
|
| 105 |
+
| Text source | Revision | Records | License |
|
| 106 |
+
|---|---|---:|---|
|
| 107 |
+
| [RuSentiment](https://github.com/strawberrypie/rusentiment) | `7f2afa11a9483f5251cd5156ac848d098b502be0` | 15,158 | CC BY-NC-SA 4.0 |
|
| 108 |
+
| [Dialogs](https://huggingface.co/datasets/langswap/dialogs-ru-emotional-conversations) | `e25ba617b2b56bd1dbf255d3905c51bd8da3d31f` | 7,540 | OpenRAIL |
|
| 109 |
+
|
| 110 |
+
Key settings were NF4 QLoRA with BF16 compute, LoRA
|
| 111 |
+
`r=16`, `alpha=32`, dropout `0.05`, maximum sequence length 384, effective batch
|
| 112 |
+
size 16, and learning rate `1e-4`. The full machine-independent summary is in
|
| 113 |
+
[training_config.yaml](training_config.yaml).
|
| 114 |
+
|
| 115 |
+
## Evaluation
|
| 116 |
+
|
| 117 |
+
Both checkpoints were compared on the same 300 clean and 300 synthetically
|
| 118 |
+
corrupted validation requests:
|
| 119 |
+
|
| 120 |
+
| Checkpoint | Clean micro CER | Mixed micro CER | Unnecessary clean modifications |
|
| 121 |
+
|---|---:|---:|---:|
|
| 122 |
+
| checkpoint 780 | 1.9407% | 19.5066% | 54 / 300 |
|
| 123 |
+
| checkpoint 1560 | 2.0616% | 19.6204% | 57 / 300 |
|
| 124 |
+
|
| 125 |
+
The selected checkpoint 780 was then compared with the frozen BF16 base model:
|
| 126 |
+
|
| 127 |
+
| Evaluation slice | Rows | Base micro CER | Adapter micro CER |
|
| 128 |
+
|---|---:|---:|---:|
|
| 129 |
+
| in-domain mixed | 1,000 | 22.4742% | 20.4710% |
|
| 130 |
+
| external mixed | 2,000 | 22.5886% | 18.8385% |
|
| 131 |
+
| external clean control | 2,000 | 1.6814% | 0.4886% |
|
| 132 |
+
|
| 133 |
+
The external set contains 1,600 human Opusparcus-derived phrases and 400
|
| 134 |
+
synthetic phrases. The clean control uses the original phrases, while the mixed
|
| 135 |
+
condition applies the same artificial character-corruption protocol.
|
| 136 |
+
|
| 137 |
+
On the external clean control, unnecessary modifications decreased from 24.35%
|
| 138 |
+
to 5.85%. These results apply only to the frozen artificial-corruption protocol,
|
| 139 |
+
prompt, deterministic decoding, Russian text sources, and evaluated phrase
|
| 140 |
+
lengths.
|
| 141 |
+
|
| 142 |
+
## License
|
| 143 |
+
|
| 144 |
+
The training sources use different licenses, so the repository is marked
|
| 145 |
+
`license: other` rather than Apache-2.0. No commercial-use clearance or claim of
|
| 146 |
+
cross-license compatibility is provided. See [LICENSE.md](LICENSE.md) for the
|
| 147 |
+
applicable CC BY-NC-SA 4.0 and OpenRAIL terms.
|
| 148 |
+
|
| 149 |
+
Exact adapter hashes, sizes, checkpoint mapping, and verification status are in
|
| 150 |
+
[release_manifest.json](release_manifest.json).
|
adapter_config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3-4B-Instruct-2507",
|
| 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": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 16,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": "cdbee75f17c01a7cc42f958dc650907174af0554",
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"down_proj",
|
| 34 |
+
"o_proj",
|
| 35 |
+
"gate_proj",
|
| 36 |
+
"k_proj",
|
| 37 |
+
"v_proj",
|
| 38 |
+
"q_proj",
|
| 39 |
+
"up_proj"
|
| 40 |
+
],
|
| 41 |
+
"target_parameters": null,
|
| 42 |
+
"task_type": "CAUSAL_LM",
|
| 43 |
+
"trainable_token_indices": null,
|
| 44 |
+
"use_bdlora": null,
|
| 45 |
+
"use_dora": false,
|
| 46 |
+
"use_qalora": false,
|
| 47 |
+
"use_rslora": false
|
| 48 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef9507fe17f03a1f725c322aaafcc3d262953f8bff4137e048b299f32e92987f
|
| 3 |
+
size 66127776
|
checkpoint-1560/adapter_config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3-4B-Instruct-2507",
|
| 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": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 16,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": "cdbee75f17c01a7cc42f958dc650907174af0554",
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"down_proj",
|
| 34 |
+
"o_proj",
|
| 35 |
+
"gate_proj",
|
| 36 |
+
"k_proj",
|
| 37 |
+
"v_proj",
|
| 38 |
+
"q_proj",
|
| 39 |
+
"up_proj"
|
| 40 |
+
],
|
| 41 |
+
"target_parameters": null,
|
| 42 |
+
"task_type": "CAUSAL_LM",
|
| 43 |
+
"trainable_token_indices": null,
|
| 44 |
+
"use_bdlora": null,
|
| 45 |
+
"use_dora": false,
|
| 46 |
+
"use_qalora": false,
|
| 47 |
+
"use_rslora": false
|
| 48 |
+
}
|
checkpoint-1560/adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23306685a0165482806860e5d63bfc9a5388faae4e55362fee0824a628c1d9db
|
| 3 |
+
size 66127776
|
prompt.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Recover the most likely original Russian phrase from the final user message.
|
| 2 |
+
|
| 3 |
+
The input is either unchanged or was corrupted only by independent character-level noise.
|
| 4 |
+
Individual characters may have been substituted, duplicated directly beside themselves, or deleted completely.
|
| 5 |
+
Multiple errors may occur in the same phrase.
|
| 6 |
+
The corruption does not reorder the surviving characters.
|
| 7 |
+
|
| 8 |
+
Restore the exact original wording and punctuation.
|
| 9 |
+
Do not paraphrase, replace words with synonyms, or rewrite the phrase.
|
| 10 |
+
Preserve informal language, slang, and source errors not caused by the described corruption.
|
| 11 |
+
|
| 12 |
+
Return exactly one corrected Russian phrase and nothing else.
|
| 13 |
+
If the phrase is already correct, return it unchanged.
|
release_manifest.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "huggingface_adapter_release.v1",
|
| 3 |
+
"base_model": {
|
| 4 |
+
"model_id": "Qwen/Qwen3-4B-Instruct-2507",
|
| 5 |
+
"revision": "cdbee75f17c01a7cc42f958dc650907174af0554"
|
| 6 |
+
},
|
| 7 |
+
"default_checkpoint": {
|
| 8 |
+
"epoch": 1,
|
| 9 |
+
"global_step": 780,
|
| 10 |
+
"path": ".",
|
| 11 |
+
"selected": true,
|
| 12 |
+
"adapter_size_bytes": 66127776,
|
| 13 |
+
"adapter_sha256": "ef9507fe17f03a1f725c322aaafcc3d262953f8bff4137e048b299f32e92987f"
|
| 14 |
+
},
|
| 15 |
+
"alternative_checkpoints": [
|
| 16 |
+
{
|
| 17 |
+
"epoch": 2,
|
| 18 |
+
"global_step": 1560,
|
| 19 |
+
"path": "checkpoint-1560",
|
| 20 |
+
"selected": false,
|
| 21 |
+
"adapter_size_bytes": 66127776,
|
| 22 |
+
"adapter_sha256": "23306685a0165482806860e5d63bfc9a5388faae4e55362fee0824a628c1d9db"
|
| 23 |
+
}
|
| 24 |
+
],
|
| 25 |
+
"training": {
|
| 26 |
+
"record_count": 22698,
|
| 27 |
+
"token_count": 4784492,
|
| 28 |
+
"source_records": {
|
| 29 |
+
"strawberrypie/rusentiment": 15158,
|
| 30 |
+
"langswap/dialogs-ru-emotional-conversations": 7540
|
| 31 |
+
}
|
| 32 |
+
},
|
| 33 |
+
"license": {
|
| 34 |
+
"huggingface_id": "other",
|
| 35 |
+
"name": "mixed-source-cc-by-nc-sa-4.0-and-openrail",
|
| 36 |
+
"notice_path": "LICENSE.md"
|
| 37 |
+
},
|
| 38 |
+
"verification": {
|
| 39 |
+
"verified_on": "2026-07-23",
|
| 40 |
+
"model_card_metadata_local_parse": "passed",
|
| 41 |
+
"peft_config_load": "passed",
|
| 42 |
+
"safetensors_hash_tensor_and_finite_check": "passed",
|
| 43 |
+
"offline_base_and_adapter_load_smoke": {
|
| 44 |
+
"checkpoint-780": "passed",
|
| 45 |
+
"checkpoint-1560": "passed"
|
| 46 |
+
},
|
| 47 |
+
"huggingface_server_yaml_validation": "not_run_before_upload"
|
| 48 |
+
},
|
| 49 |
+
"excluded_checkpoint_files": [
|
| 50 |
+
"README.md",
|
| 51 |
+
"chat_template.jinja",
|
| 52 |
+
"optimizer.pt",
|
| 53 |
+
"rng_state.pth",
|
| 54 |
+
"scheduler.pt",
|
| 55 |
+
"tokenizer.json",
|
| 56 |
+
"tokenizer_config.json",
|
| 57 |
+
"trainer_state.json",
|
| 58 |
+
"training_args.bin"
|
| 59 |
+
]
|
| 60 |
+
}
|
training_config.yaml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 2 |
+
base_revision: cdbee75f17c01a7cc42f958dc650907174af0554
|
| 3 |
+
seed: 20260720
|
| 4 |
+
train_records: 22698
|
| 5 |
+
train_tokens: 4784492
|
| 6 |
+
epochs: 2
|
| 7 |
+
max_length: 384
|
| 8 |
+
per_device_train_batch_size: 2
|
| 9 |
+
gradient_accumulation_steps: 8
|
| 10 |
+
effective_batch_size: 16
|
| 11 |
+
learning_rate: 1.0e-4
|
| 12 |
+
warmup_ratio: 0.03
|
| 13 |
+
optimizer: paged_adamw_8bit
|
| 14 |
+
lr_scheduler_type: linear
|
| 15 |
+
max_grad_norm: 1.0
|
| 16 |
+
weight_decay: 0.0
|
| 17 |
+
completion_only_loss: true
|
| 18 |
+
packing: true
|
| 19 |
+
packing_strategy: wrapped
|
| 20 |
+
gradient_checkpointing: true
|
| 21 |
+
quantization:
|
| 22 |
+
load_in_4bit: true
|
| 23 |
+
quant_type: nf4
|
| 24 |
+
compute_dtype: bfloat16
|
| 25 |
+
double_quantization: true
|
| 26 |
+
lora:
|
| 27 |
+
rank: 16
|
| 28 |
+
alpha: 32
|
| 29 |
+
dropout: 0.05
|
| 30 |
+
bias: none
|
| 31 |
+
target_modules: all-linear
|
| 32 |
+
software:
|
| 33 |
+
torch: 2.11.0+cu128
|
| 34 |
+
cuda: "12.8"
|
| 35 |
+
transformers: 5.14.1
|
| 36 |
+
peft: 0.19.1
|
| 37 |
+
trl: 1.8.0
|
| 38 |
+
bitsandbytes: 0.49.2
|