Instructions to use mjpsm/activity-generation-v1.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mjpsm/activity-generation-v1.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mjpsm/activity-generation-v1.3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mjpsm/activity-generation-v1.3") model = AutoModelForCausalLM.from_pretrained("mjpsm/activity-generation-v1.3", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use mjpsm/activity-generation-v1.3 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mjpsm/activity-generation-v1.3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mjpsm/activity-generation-v1.3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mjpsm/activity-generation-v1.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mjpsm/activity-generation-v1.3
- SGLang
How to use mjpsm/activity-generation-v1.3 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mjpsm/activity-generation-v1.3" \ --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": "mjpsm/activity-generation-v1.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "mjpsm/activity-generation-v1.3" \ --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": "mjpsm/activity-generation-v1.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mjpsm/activity-generation-v1.3 with Docker Model Runner:
docker model run hf.co/mjpsm/activity-generation-v1.3
- activity-generation-v1.3
- Model Details
- What Is MyVillage?
- Intended Use
- Input Format
- Output Format
- Output Behavior
- Handling Vague Knowledge Submissions
- Training Data
- Training Method
- Training Objective
- Evaluation
- Known Limitations
- Out-of-Scope Uses
- Future Work
- Loading the Merged Model
- Basic Inference Example
- Attribution
- Disclaimer
- Model Details
activity-generation-v1.3
activity-generation-v1.3 is a fine-tuned version of Qwen/Qwen2.5-0.5B-Instruct built for the MyVillage ecosystem.
Its role is to generate the smallest useful next activity from four pieces of context:
village_goalprevious_activity_titleknowledge_submission- one
wisdomobject
The model is designed for micro-progression, not full curriculum generation.
One activity. One primary action. One small progression.
Model Details
- Model:
activity-generation-v1.3 - Base model:
Qwen/Qwen2.5-0.5B-Instruct - Training: Supervised Fine-Tuning (SFT)
- Fine-tuning method: LoRA
- Adapter merge: Yes; the trained LoRA adapter was merged back into the base model
- Training data: approximately 1.2K synthetic SFT examples
- Framework: Hugging Face Transformers + PEFT
- Primary task: MyVillage next-activity generation
- Language: English
What Is MyVillage?
MyVillage is a community-centered learning ecosystem built around the idea that communities already contain knowledge worth preserving, sharing, and learning from.
Villagers work toward goals through activities, submit what they learned or completed, contribute wisdom, and use that context to continue progressing.
For this model:
Village Goal
+
Previous Activity
+
Knowledge Submission
+
Wisdom
↓
Smallest useful next activity
The model is not intended to generate full curricula, lesson plans, or large assignments.
Intended Use
The model generates one short next activity after a villager completes or attempts a previous activity.
It is designed to:
- generate one small next step
- keep tasks concise
- avoid multi-step assignments
- use wisdom implicitly
- respond appropriately to vague or incomplete knowledge submissions
- ask for clarification or evidence when there is not enough information to progress safely
Input Format
{
"village_goal": "...",
"previous_activity_title": "...",
"knowledge_submission": "...",
"wisdom": {
"chapterTitle": "...",
"bookName": "...",
"bookTypeName": "...",
"content": "..."
}
}
Output Format
The model is trained to predict exactly:
{
"activity_title": "...",
"activity_description": "...",
"activity_instructions": "..."
}
The model is not trained to predict dataset metadata such as:
- department
- domain
- activity type
- difficulty
- submission quality
- messy type
- row IDs
- source metadata
Those fields were used only for dataset generation, balancing, debugging, and analysis.
Output Behavior
Activity title
Should be short, direct, and describe the next micro-progression.
Activity description
Should briefly explain the activity itself.
The model was trained to avoid phrasing such as:
The learner will...
The student will...
The villager will...
The user will...
Activity instructions
Should:
- contain one primary action
- normally be one sentence
- never become a large multi-step assignment
- avoid unnecessary tool usage
- request clarification when the knowledge submission is insufficient
Handling Vague Knowledge Submissions
A major design goal of v1.3 is preventing the model from inventing progress from insufficient evidence.
Example Input
{
"village_goal": "Understanding how to train and fine-tune AI models",
"previous_activity_title": "Test Your Classifier Model",
"knowledge_submission": "Completed",
"wisdom": {
"chapterTitle": "Testing With Purpose",
"bookName": "The Proverbs of Model Building",
"bookTypeName": "Proverbs",
"content": "Testing is not a final step; it is a conversation with what you built."
}
}
Base Model Output
{
"activity_title": "Testing Your Classifier Model",
"activity_description": "I tested my classifier model by training it on a dataset and evaluating its performance. I also fine-tuned the model using cross-validation techniques.",
"activity_instructions": "I will now test my classifier model again to ensure its accuracy and reliability. Please provide feedback on the results."
}
The base model invented details that were not provided, including training, cross-validation, and evaluation behavior.
Fine-Tuned v1.3 Output
{
"activity_title": "Show Your Classifier Model",
"activity_description": "Describe your classifier model test result.",
"activity_instructions": "What did you get?"
}
The fine-tuned model recognized that Completed did not provide enough evidence for a technical next step and instead asked for clarification.
Training Data
The model was trained on approximately 1.2K synthetic examples created specifically for the MyVillage activity-generation task.
The synthetic pipeline used real MyVillage material as reference guidance for style and structure, including:
- village goals
- previous activity titles
- knowledge submissions
- MyVillage wisdom
The dataset intentionally included both clean and messy knowledge submissions so the model could learn clarification behavior.
The training data also covered:
- Coding in Color domains
- broader MyVillage domains
- CREATE, REFLECTION, and RESEARCH activity patterns
- Chronicle, Testimony, Parables, and Proverbs wisdom styles
Training Method
The model was fine-tuned using LoRA on top of Qwen/Qwen2.5-0.5B-Instruct.
LoRA targeted Qwen attention and MLP projection layers including:
q_proj
k_proj
v_proj
o_proj
gate_proj
up_proj
down_proj
After training, the adapter was merged into the base model:
Qwen/Qwen2.5-0.5B-Instruct
+
LoRA adapter
↓
merged activity-generation-v1.3
The merged model can be loaded directly without attaching the adapter separately.
Training Objective
The training pipeline used assistant-only loss masking.
System Prompt → ignored by loss
User Context → ignored by loss
Assistant Activity → trained
This focuses the training signal on the three activity output fields rather than teaching the model to reproduce its inputs.
Evaluation
The merged model was compared against the untouched base model on held-out examples.
Observed improvements included:
- much stronger JSON output consistency
- shorter and more focused activities
- less copying of wisdom
- less repetition of the previous activity
- better handling of vague submissions
- fewer invented details
- stronger micro-progression behavior
The strongest improvement was clarification behavior for vague submissions such as:
Completed
just did the activity and it's done now
started testing game mechanics
The fine-tuned model generally responded by asking the villager to show or describe what happened instead of inventing unseen progress.
Known Limitations
Micro-progression strictness
The model may still occasionally produce a task that is too large.
For example:
Research and experiment with 5 different compression techniques.
A better activity would be:
Research one compression technique that could reduce the accuracy loss.
Best-next-step precision
The model can generate a relevant progression without always selecting the most precise next step.
Unsupported specificity
The model may occasionally introduce details that were not explicitly established by the input.
Small model capacity
The base model is approximately 0.5B parameters, so expectations should match a small specialized model rather than a large general-purpose LLM.
Age agnostic
The model currently receives no explicit age information.
Out-of-Scope Uses
This model should not be relied on for:
- high-stakes educational decisions
- grading
- determining mastery
- psychological assessment
- medical, legal, or financial advice
- full curriculum generation
- fully autonomous progression without application-level validation
Future Work
The next planned stage is Direct Preference Optimization (DPO).
SFT has taught the model the basic task. DPO will focus on preference-level improvements such as:
one small action
vs
multi-step assignment
precise next step
vs
generic next step
supported context
vs
invented details
clarification when needed
vs
fabricated progression
Planned pipeline:
Qwen/Qwen2.5-0.5B-Instruct
↓
activity-generation-v1.3 SFT
↓
chosen / rejected preference pairs
↓
DPO
↓
improved activity-generation model
Loading the Merged Model
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "YOUR_USERNAME/activity-generation-v1.3"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
device_map="auto",
)
Basic Inference Example
import json
import torch
SYSTEM_PROMPT = """You are MyVillage's activity-generation model.
Generate exactly one small next micro-progression activity.
Rules:
- One activity, one primary action, one small progression.
- Use the village goal, previous activity, knowledge submission, and wisdom.
- If the knowledge submission is vague or insufficient, ask for clarification before progressing.
- Do not quote or explicitly mention the wisdom.
- Return only valid JSON with exactly these keys:
activity_title
activity_description
activity_instructions
"""
payload = {
"village_goal": "Understanding how to train and fine-tune AI models",
"previous_activity_title": "Test Your Classifier Model",
"knowledge_submission": "Completed",
"wisdom": {
"chapterTitle": "Testing With Purpose",
"bookName": "The Proverbs of Model Building",
"bookTypeName": "Proverbs",
"content": "Testing is not a final step; it is a conversation with what you built."
}
}
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": json.dumps(payload, indent=2)}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
)
device = next(model.parameters()).device
inputs = {k: v.to(device) for k, v in inputs.items()}
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=180,
do_sample=False,
repetition_penalty=1.05,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
generated = output[0, inputs["input_ids"].shape[-1]:]
print(
tokenizer.decode(
generated,
skip_special_tokens=True,
)
)
Attribution
If using this model publicly, please credit:
activity-generation-v1.3
Built for the MyVillage ecosystem
Base model: Qwen/Qwen2.5-0.5B-Instruct
Disclaimer
This is an experimental specialized activity-generation model.
Outputs should be evaluated within the MyVillage product context before production use. The model may still produce irrelevant, overly broad, unsupported, or malformed outputs, especially for inputs outside its training distribution.
- Downloads last month
- 257