--- license: mit language: - vi - en base_model: - Qwen/Qwen2.5-3B-Instruct pipeline_tag: text-generation tags: - peft - lora - text-rewriting - style-transfer --- # DeAIze: AI Text to Personal Writing Style ## Model Description DeAIze is a fine-tuned LoRA adapter based on the `Qwen/Qwen2.5-3B-Instruct` model. Its primary purpose is to "de-AI-ze" text—taking standard, often generic or robotic-sounding AI-generated text and rewriting it to match a more natural, personal writing style. - **Model type:** Causal Language Model (LoRA Adapter) - **Language(s):** Vietnamese (vi), English (en) - **License:** MIT - **Base model:** Qwen/Qwen2.5-3B-Instruct ## Intended Use This model is intended to humanize AI-generated content. By providing draft text generated by other AI assistants, you can use this model to rephrase the content so that it flows naturally and mimics your specific personal tone and vocabulary. ## How to Use Because this is a Parameter-Efficient Fine-Tuning (PEFT) model, you will need to load the base model and then apply this LoRA adapter on top of it. You can do this easily using the `transformers` and `peft` libraries. ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base_model_name = "Qwen/Qwen2.5-3B-Instruct" adapter_model_name = "Youmei295/deAize" # Load the base tokenizer and model tokenizer = AutoTokenizer.from_pretrained(base_model_name) base_model = AutoModelForCausalLM.from_pretrained(base_model_name, device_map="auto") # Load the LoRA adapter model = PeftModel.from_pretrained(base_model, adapter_model_name) # Generate text prompt = "Rewrite this text to match my natural writing style: The utilization of advanced methodologies can significantly enhance operational efficiency." messages = [ {"role": "system", "content": "You are a helpful assistant that rewrites text into a natural, personal writing style."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = tokenizer(text, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ## Training Details This model was trained using Low-Rank Adaptation (LoRA) to efficiently update the base model's weights. - **Rank (r):** 16 - **LoRA Alpha:** 16 - **Dropout:** 0.05 - **Target Modules:** `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj`