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-merged", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("D0zy/essay-model-merged", trust_remote_code=True, device_map="auto", dtype=torch.bfloat16)


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
-
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for D0zy/essay-model-merged

Adapter
(11)
this model

Dataset used to train D0zy/essay-model-merged