Instructions to use D0zy/essay-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use D0zy/essay-model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B") model = PeftModel.from_pretrained(base_model, "D0zy/essay-model") - Notebooks
- Google Colab
- Kaggle
essay-model
This model is a modified (fine-tuned) version of [LiquidAI/LFM3-1.7B] by Liquid AI. It is a LoRA fine-tune of LiquidAI/LFM3-1.7B that acts as an IELTS Writing Task 2 examiner: given the task question and an essay, it outputs an overall band score followed by feedback on Task Response, Coherence & Cohesion, Lexical Resource and Grammatical Range & Accuracy.
Training
- Data: chillies/IELTS-writing-task-2-evaluation (~7,000 train examples, max 2048 tokens; loss only on the evaluation part)
- Method: LoRA (r=16, alpha=32, dropout=0.05, all linear layers), 1 epoch, lr 2e-4, cosine schedule, effective batch size 8
- Final validation loss: ~0.418
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("D0zy/essay-model", trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B", trust_remote_code=True, device_map="auto", dtype=torch.bfloat16)
model = PeftModel.from_pretrained(base, "D0zy/essay-model").eval()
SYSTEM = ("You are a certified IELTS examiner. Evaluate the IELTS Writing Task 2 essay. "
"First give the overall band score, then detailed feedback on Task Response, "
"Coherence and Cohesion, Lexical Resource and Grammatical Range and Accuracy.")
msgs = [{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Question:\n<task question>\n\nEssay:\n<essay>"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=700, do_sample=False, repetition_penalty=1.05)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
License
This model is a Derivative Work of LiquidAI/LFM3-1.7B and is distributed under the LFM Open License v1.0 (see the LICENSE file in this repository; original: https://huggingface.co/LiquidAI/LFM3-1.7B).
- Modifications: LoRA fine-tuning on IELTS essay evaluation data (by D0zy). The original model weights were not otherwise changed.
- All copyright and attribution notices of the original work are retained.
- Commercial use is only permitted for entities below the revenue threshold defined in the license (USD 10M annual revenue); see the license for details.
- This project is not affiliated with or endorsed by Liquid AI. "LFM" and "Liquid AI" are trademarks of Liquid AI.
Limitations
Scores are model estimates learned from a community dataset, not official IELTS results. Use for practice and feedback only. License terms of the base model apply.
- Downloads last month
- 14