Mic-Fundraiser/fundraising-english-sft
Viewer • Updated • 10.6k • 28
How to use Mic-Fundraiser/fundraising-coach-en with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Mic-Fundraiser/fundraising-coach-en")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Mic-Fundraiser/fundraising-coach-en")
model = AutoModelForCausalLM.from_pretrained("Mic-Fundraiser/fundraising-coach-en", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use Mic-Fundraiser/fundraising-coach-en with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Mic-Fundraiser/fundraising-coach-en"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Mic-Fundraiser/fundraising-coach-en",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Mic-Fundraiser/fundraising-coach-en
How to use Mic-Fundraiser/fundraising-coach-en with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Mic-Fundraiser/fundraising-coach-en" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Mic-Fundraiser/fundraising-coach-en",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "Mic-Fundraiser/fundraising-coach-en" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Mic-Fundraiser/fundraising-coach-en",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Mic-Fundraiser/fundraising-coach-en with Docker Model Runner:
docker model run hf.co/Mic-Fundraiser/fundraising-coach-en
A conversational language model fine-tuned exclusively on nonprofit fundraising coaching in English. Produces structured answers: diagnosis → options → recommendation. Trained to avoid fabricating statistics or specific legal/tax guidance.
Base: Qwen/Qwen2.5-7B-Instruct.
Dataset: Mic-Fundraiser/fundraising-english-sft (10,085 train + 530 val, distilled from 14 reference texts).
Live demo on Hugging Face Spaces
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Mic-Fundraiser/fundraising-coach-en"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
SYSTEM = (
"You are an experienced nonprofit fundraising coach. For any substantive question, "
"structure your answer as: (1) a brief diagnosis of what the core issue really is, "
"(2) the main options with their tradeoffs, (3) a concrete recommendation with the "
"reasoning behind it. Be direct, grounded, and practical."
)
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Our annual fund is flat. What should I look at first?"},
]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
return_tensors="pt", return_dict=False).to(model.device)
out = model.generate(input_ids, max_new_tokens=500, do_sample=True,
temperature=0.6, top_p=0.9, repetition_penalty=1.05)
print(tokenizer.decode(out[0][input_ids.shape[1]:], skip_special_tokens=True))
| Method | SFT + QLoRA (4-bit) |
| LoRA | r=32, α=64, dropout=0.05 |
| Modules | q/k/v/o/gate/up/down |
| Epochs | 2 |
| LR | 1.5e-4 · cosine |
| Eff. batch | 16 · grad accum 8 |
| Seq length | 2048 · packing enabled |
| Hardware | NVIDIA L40S (HF Jobs) |
| Framework | TRL + PEFT + transformers |
fundraising-assistant.