Downloads · 30 days
0
Miemczyk/CharityPurposeAnalyser
CharityPurposeAnalyser is a text generation model from Miemczyk. Use it when you need the model to write or continue text. It is set up for mlx-lm. The card lists the license as other.
This repository hosts a LoRA adapter that fine tunes meta-llama/Llama-3.2-1B-Instruct to rate charity purpose or mission statements on five scales: Specificity, Clarity, Impact, Inclusivity, and Attainable Goals. The…
Downloads · 30 days
0
Access
Public
Updated Sep 30, 2025
Repo size
3.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors3.4 MB · 100%
From the Hugging Face model README
This repository hosts a LoRA adapter that fine tunes meta-llama/Llama-3.2-1B-Instruct to rate charity purpose or mission statements on five scales: Specificity, Clarity, Impact, Inclusivity, and Attainable Goals.
The adapter is trained with MLX on Apple Silicon using the mlx-community/Llama-3.2-1B-Instruct-4bit base for low memory.
Note: This repo contains LoRA weights only. You will need the base model from Meta under the Llama 3.2 community license. See the license section below.
# Inference with the adapter
mlx_lm generate --model mlx-community/Llama-3.2-1B-Instruct-4bit --adapter-path /path/to/adapter-folder --temp 0.2 --max-tokens 120 --prompt 'You are a strict rater of charity purpose statements. Use only the 1 to 5 scale.
Rate the charity purpose statement on five 1 to 5 scales. Return only a compact JSON object with these integer keys: Specificity, Clarity, Impact, Inclusivity, "Attainable Goals". Do not include explanations.
Charity: Example Org
Statement: "We help young people into good jobs through mentoring and accredited training."'```
from mlx_lm import load, generate
MODEL = "mlx-community/Llama-3.2-1B-Instruct-4bit"
ADAPTER = "/path/to/adapter-folder" # folder that contains adapters.safetensors
system = "You are a strict rater of charity purpose statements. Use only the 1 to 5 scale."
user = (
'Rate the charity purpose statement on five 1 to 5 scales. '
'Return only a compact JSON object with these integer keys: '
'Specificity, Clarity, Impact, Inclusivity, "Attainable Goals". '
'Do not include explanations.\n\n'
'Charity: Example Org\n'
'Statement: "We help young people into good jobs through mentoring and accredited training."'
)
prompt = f"{system}\n\n{user}"
model, tokenizer = load(MODEL, adapter_path=ADAPTER)
out = generate(model, tokenizer, prompt, max_tokens=120, temp=0.2)
print(out)
System
You are a strict rater of charity purpose statements. Use only the 1 to 5 scale.
User
Rate the charity purpose statement on five 1 to 5 scales. Return only a compact JSON object with these integer keys: Specificity, Clarity, Impact, Inclusivity, "Attainable Goals". Do not include explanations.
Charity: {name}
Statement: "{text}"
Assistant target
{"Specificity": <int>, "Clarity": <int>, "Impact": <int>, "Inclusivity": <int>, "Attainable Goals": <int>}
Keep temperature low. 0.2 is a good default.
messages entries--mask-prompt so loss applies to assistant tokens onlyA simple validation check reports mean absolute error per label. You can reproduce quickly by sampling valid.jsonl and generating with temperature 0.2, then parsing the JSON.
Suggested metrics