Text Generation
Transformers
Safetensors
qwen3
multiple-choice
general-knowledge
lora
sft
boxed-answer
conversational
text-generation-inference
Instructions to use cs-552-2026-databand/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-databand/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-databand/general_knowledge_model") 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("cs-552-2026-databand/general_knowledge_model") model = AutoModelForCausalLM.from_pretrained("cs-552-2026-databand/general_knowledge_model", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cs-552-2026-databand/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-databand/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-databand/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs-552-2026-databand/general_knowledge_model
- SGLang
How to use cs-552-2026-databand/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-databand/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-databand/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-databand/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-databand/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cs-552-2026-databand/general_knowledge_model with Docker Model Runner:
docker model run hf.co/cs-552-2026-databand/general_knowledge_model
Update README with validation and benchmark comparison
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ tags:
|
|
| 16 |
|
| 17 |
This is the final General Knowledge individual model for the CS-552 Modern NLP Spring 2026 standardized project.
|
| 18 |
|
| 19 |
-
The submitted model is the SFT-only merged model. A later DPO experiment was run on ARC/CommonsenseQA mistakes, but it reduced benchmark accuracy, so it was not selected as the final model.
|
| 20 |
|
| 21 |
## Model behavior
|
| 22 |
|
|
@@ -77,8 +77,6 @@ The SFT training data was built from:
|
|
| 77 |
5. SciQ train
|
| 78 |
6. OpenBookQA train
|
| 79 |
|
| 80 |
-
The final SFT dataset was capped below 30,000 training rows.
|
| 81 |
-
|
| 82 |
Final SFT data sizes:
|
| 83 |
|
| 84 |
- Train: 26,120
|
|
@@ -98,40 +96,49 @@ Validation answer distribution:
|
|
| 98 |
|
| 99 |
The final selected model is the SFT-only merged model.
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
-
- MMLU Pro: 2,000, uniformly sampled across categories
|
| 105 |
-
- MMLU Redux: 2,000, uniformly sampled across subjects
|
| 106 |
-
- SuperGPQA: 2,000, uniformly sampled across disciplines
|
| 107 |
|
| 108 |
-
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
|
|
| 111 |
-
|---|---:|---:|
|
| 112 |
-
|
|
| 113 |
-
| MMLU
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|---|---:|---:|
|
| 120 |
-
|
|
| 121 |
-
|
|
| 122 |
-
|
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
-
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|---|---:|
|
| 129 |
-
| Validation 2k | 79.75% |
|
| 130 |
-
| MMLU Pro 2k | 35.25% |
|
| 131 |
-
| MMLU Redux 2k | 50.90% |
|
| 132 |
-
| SuperGPQA 2k | 23.45% |
|
| 133 |
|
| 134 |
-
|
| 135 |
|
| 136 |
## Expected input format
|
| 137 |
|
|
@@ -155,6 +162,7 @@ Important files from the training folder:
|
|
| 155 |
|
| 156 |
- SFT trainer: scripts/train_v3_lora_sft_masked.py
|
| 157 |
- SFT data builder: scripts/build_my_sft_data_balanced.py
|
|
|
|
| 158 |
- Merge script: scripts/merge_v3_lora_adapter.py
|
| 159 |
- Evaluation script: scripts/evaluate_mcq_accuracy.py
|
| 160 |
|
|
|
|
| 16 |
|
| 17 |
This is the final General Knowledge individual model for the CS-552 Modern NLP Spring 2026 standardized project.
|
| 18 |
|
| 19 |
+
The submitted model is the **SFT-only merged model**. A later DPO experiment was run on ARC/CommonsenseQA mistakes, but it reduced external benchmark accuracy, so it was **not selected** as the final model.
|
| 20 |
|
| 21 |
## Model behavior
|
| 22 |
|
|
|
|
| 77 |
5. SciQ train
|
| 78 |
6. OpenBookQA train
|
| 79 |
|
|
|
|
|
|
|
| 80 |
Final SFT data sizes:
|
| 81 |
|
| 82 |
- Train: 26,120
|
|
|
|
| 96 |
|
| 97 |
The final selected model is the SFT-only merged model.
|
| 98 |
|
| 99 |
+
The “SFT validation” set in the table is the held-out validation set created from the same six dataset families used for LoRA SFT training: Kaggle LLM Science, EduQG, EduAdapt MCQ, NCERT_MCQs, SciQ, and OpenBookQA. It contains 2,000 examples and is answer-balanced across A through T.
|
| 100 |
|
| 101 |
+
External benchmark sets:
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
+
- MMLU Pro: 2,000 examples, uniformly sampled across categories
|
| 104 |
+
- MMLU Redux: 2,000 examples, uniformly sampled across subjects
|
| 105 |
+
- SuperGPQA: 2,000 examples, uniformly sampled across disciplines
|
| 106 |
|
| 107 |
+
| Evaluation set | Baseline boxed | Baseline accuracy | SFT-only boxed | SFT-only accuracy | SFT + DPO boxed | SFT + DPO accuracy |
|
| 108 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 109 |
+
| SFT validation 2k | 19.20% | 16.00% | 100.00% | 85.30% | 100.00% | 79.75% |
|
| 110 |
+
| MMLU Pro 2k | 60.25% | 18.05% | 100.00% | 37.85% | 100.00% | 35.25% |
|
| 111 |
+
| MMLU Redux 2k | 26.65% | 11.40% | 100.00% | 56.25% | 100.00% | 50.90% |
|
| 112 |
+
| SuperGPQA 2k | 66.95% | 15.85% | 99.95% | 27.55% | 100.00% | 23.45% |
|
| 113 |
+
|
| 114 |
+
The DPO experiment improved neither the selected SFT validation score nor the external benchmark scores. Therefore, the SFT-only merged model was selected as the final model.
|
| 115 |
+
|
| 116 |
+
### SFT validation details
|
| 117 |
|
| 118 |
+
SFT-only evaluation on the held-out SFT validation set:
|
| 119 |
|
| 120 |
+
- Total: 2,000
|
| 121 |
+
- Extracted boxed answer: 2,000 / 2,000 = 100.00%
|
| 122 |
+
- Accuracy: 1,706 / 2,000 = 85.30%
|
| 123 |
+
|
| 124 |
+
Accuracy by validation source:
|
| 125 |
+
|
| 126 |
+
| Source | Accuracy | Boxed extraction |
|
| 127 |
|---|---:|---:|
|
| 128 |
+
| eduadapt | 82.35% (14/17) | 100.00% (17/17) |
|
| 129 |
+
| eduqg | 76.86% (93/121) | 100.00% (121/121) |
|
| 130 |
+
| kaggle_llm_science | 58.30% (130/223) | 100.00% (223/223) |
|
| 131 |
+
| ncert_mcqs | 93.33% (14/15) | 100.00% (15/15) |
|
| 132 |
+
| openbookqa | 80.83% (430/532) | 100.00% (532/532) |
|
| 133 |
+
| sciq | 93.86% (1025/1092) | 100.00% (1092/1092) |
|
| 134 |
+
|
| 135 |
+
### SuperGPQA boxed-answer edge case
|
| 136 |
|
| 137 |
+
The SFT-only model produced boxed answers for 1,999 out of 2,000 SuperGPQA examples. The single unboxed example was a long, LaTeX-heavy numerical analysis question whose answer choices contained multi-line mathematical derivations. Instead of producing a boxed option, the model continued/copy-completed part of one answer choice, generating text beginning with:
|
| 138 |
|
| 139 |
+
mathrm{d} x^{2} = 2.1730$ and $| R_{1} | ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
+
Increasing max_new_tokens from 20 to 64 did not change this outcome. The reported SuperGPQA result therefore keeps the strict extraction score of 99.95%.
|
| 142 |
|
| 143 |
## Expected input format
|
| 144 |
|
|
|
|
| 162 |
|
| 163 |
- SFT trainer: scripts/train_v3_lora_sft_masked.py
|
| 164 |
- SFT data builder: scripts/build_my_sft_data_balanced.py
|
| 165 |
+
- DPO trainer used for the unselected experiment: scripts/train_v3_lora_dpo_boxed.py
|
| 166 |
- Merge script: scripts/merge_v3_lora_adapter.py
|
| 167 |
- Evaluation script: scripts/evaluate_mcq_accuracy.py
|
| 168 |
|