Instructions to use cs-552-2026-catma/general_knowledge_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cs-552-2026-catma/general_knowledge_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cs-552-2026-catma/general_knowledge_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cs-552-2026-catma/general_knowledge_model") model = AutoModelForMultimodalLM.from_pretrained("cs-552-2026-catma/general_knowledge_model") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cs-552-2026-catma/general_knowledge_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cs-552-2026-catma/general_knowledge_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cs-552-2026-catma/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs-552-2026-catma/general_knowledge_model
- SGLang
How to use cs-552-2026-catma/general_knowledge_model 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 "cs-552-2026-catma/general_knowledge_model" \ --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": "cs-552-2026-catma/general_knowledge_model", "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 "cs-552-2026-catma/general_knowledge_model" \ --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": "cs-552-2026-catma/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cs-552-2026-catma/general_knowledge_model with Docker Model Runner:
docker model run hf.co/cs-552-2026-catma/general_knowledge_model
General Knowledge Model
This model is the General Knowledge individual-model submission for the CS-552 Modern NLP course project. It is a merged post-trained checkpoint based on Qwen/Qwen3-1.7B, developed by Tuan Dang Nguyen for closed-book multiple-choice general knowledge evaluation.
The uploaded checkpoint corresponds to the final Stage 5 merge-aware DPO model:
sft_dpo_stage5_error_contrastive_mergeaware_v1_r16_lr8e8_beta003_eval100_500_merged
Task And Output Format
The model receives a multiple-choice question and should answer with exactly one option letter inside a LaTeX boxed expression:
\boxed{C}
The evaluation pipeline extracts the letter inside \boxed{...}. Any surrounding reasoning is ignored for scoring, but the intended behavior is a concise boxed final answer.
Training Summary
The training campaign used LoRA-based post-training on top of Qwen/Qwen3-1.7B.
Main stages:
- Supervised fine-tuning on mixed general-knowledge multiple-choice data.
- Hard-source and CI-style refinements, including MMLU-Pro and variable option-count examples.
- Plus Quartz v1 SFT, which first reached the best hidden-CI score.
- Conservative Stage 2 SFT refinement from the Plus Quartz anchor.
- Stage 5 merge-aware DPO using the Stage 2 model's own wrong boxed answers plus protection pairs.
The final Stage 5 model is selected because it is the strongest merged local checkpoint. The strongest hidden-CI score was first reached by the Plus Quartz SFT anchor, and the later Stage 2/DPO submissions tied that hidden score.
Evaluation
Local evaluation used the course ten-example public General Knowledge validation snapshot in both prompt modes plus a 290-example diagnostic set built from public multiple-choice sources.
| Model | Role | Local diagnostic | Public 10-example validation | Extraction | Hidden CI |
|---|---|---|---|---|---|
sft_plus_quartz_v1_r128_7200_merged |
First hidden-CI anchor | 247/290 | 7/10 in both prompt modes | 100% | 0.4900 |
sft_stage2_plus_quartz_v1_r32_lr5e7_800_merged |
Best retained SFT refinement | 248/290 | 7/10 in both prompt modes | 100% | 0.4900 tie |
sft_dpo_stage2_plus_quartz_v1_from_800_mistake_only_r16_lr2e7_beta005_200_merged |
Early DPO refinement | 248/290 | 7/10 in both prompt modes | 100% | 0.4900 tie |
sft_dpo_stage5_error_contrastive_mergeaware_v1_r16_lr8e8_beta003_eval100_500_merged |
Uploaded final model | 249/290 | 7/10 in both prompt modes | 100% | 0.4900 tie |
Interpretation: DPO improved the retained merged local diagnostic result and made checkpoint selection more robust, but it did not improve beyond the best hidden-CI SFT score of 0.4900.
Usage Notes
This checkpoint is a fully merged model, not a standalone LoRA adapter. It can be loaded with standard transformers text-generation tooling.
For best compatibility with the course evaluator:
- Ask closed-book multiple-choice questions.
- Include clear answer options.
- Require the model to finish with
\boxed{LETTER}. - Score only the extracted boxed letter.
Example prompt:
Answer the following multiple-choice question. Return only the final answer in the form \boxed{LETTER}.
Question: Which planet is known as the Red Planet?
A) Venus
B) Mars
C) Jupiter
D) Mercury
Expected style:
\boxed{B}
Limitations
This model is specialized for English closed-book multiple-choice general knowledge. It is not a general chat assistant and should not be used as a reliable factual oracle outside the benchmark setting. Local diagnostics were useful for model selection but did not perfectly predict hidden-CI changes; hidden-CI accuracy remained tied at 0.4900 for the final refinements.
- Downloads last month
- 916