Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use cs-552-2026-flab/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-flab/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-flab/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-flab/general_knowledge_model") model = AutoModelForCausalLM.from_pretrained("cs-552-2026-flab/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-flab/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-flab/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-flab/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs-552-2026-flab/general_knowledge_model
- SGLang
How to use cs-552-2026-flab/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-flab/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-flab/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-flab/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-flab/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cs-552-2026-flab/general_knowledge_model with Docker Model Runner:
docker model run hf.co/cs-552-2026-flab/general_knowledge_model
flab general_knowledge/sft 20260525_104615
Browse files- README.md +7 -15
- hydra/.hydra/config.yaml +19 -19
- hydra/.hydra/hydra.yaml +9 -15
- hydra/.hydra/overrides.yaml +2 -8
- model.safetensors +1 -1
- tokenizer_config.json +1 -1
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
-
model_name: '
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
|
|
|
| 6 |
- trl
|
| 7 |
-
- grpo
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# Model Card for
|
| 12 |
|
| 13 |
-
This model is a fine-tuned version of [
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
@@ -26,11 +27,11 @@ print(output["generated_text"])
|
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/cs-552-2026-flab/flab-cs552/runs/
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
-
This model was trained with
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
|
@@ -42,16 +43,7 @@ This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing
|
|
| 42 |
|
| 43 |
## Citations
|
| 44 |
|
| 45 |
-
Cite GRPO as:
|
| 46 |
|
| 47 |
-
```bibtex
|
| 48 |
-
@article{shao2024deepseekmath,
|
| 49 |
-
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
|
| 50 |
-
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
|
| 51 |
-
year = 2024,
|
| 52 |
-
eprint = {arXiv:2402.03300},
|
| 53 |
-
}
|
| 54 |
-
```
|
| 55 |
|
| 56 |
Cite TRL as:
|
| 57 |
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3-1.7B
|
| 3 |
library_name: transformers
|
| 4 |
+
model_name: '20260519_023851'
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
- trl
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Model Card for 20260519_023851
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/cs-552-2026-flab/flab-cs552/runs/slclweh8)
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
+
This model was trained with SFT.
|
| 35 |
|
| 36 |
### Framework versions
|
| 37 |
|
|
|
|
| 43 |
|
| 44 |
## Citations
|
| 45 |
|
|
|
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
Cite TRL as:
|
| 49 |
|
hydra/.hydra/config.yaml
CHANGED
|
@@ -5,40 +5,40 @@ model:
|
|
| 5 |
attn_impl: flash_attention_2
|
| 6 |
max_model_len: 4096
|
| 7 |
data:
|
| 8 |
-
name:
|
| 9 |
-
loader:
|
| 10 |
kwargs:
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
n_arc: null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
seed: 0
|
| 14 |
training:
|
| 15 |
-
recipe:
|
| 16 |
-
num_generations: 8
|
| 17 |
-
max_completion_length: 256
|
| 18 |
-
temperature: 1.0
|
| 19 |
-
top_p: 0.9
|
| 20 |
-
beta: 0.0
|
| 21 |
epochs: 1
|
| 22 |
per_device_train_batch_size: 1
|
| 23 |
-
gradient_accumulation_steps:
|
| 24 |
-
learning_rate:
|
| 25 |
-
warmup_ratio: 0.
|
| 26 |
lr_scheduler_type: cosine
|
| 27 |
gradient_checkpointing: true
|
| 28 |
bf16: true
|
| 29 |
-
logging_steps: 5
|
| 30 |
-
save_steps: 50
|
| 31 |
-
save_total_limit: 2
|
| 32 |
max_seq_length: 4096
|
| 33 |
-
|
|
|
|
|
|
|
| 34 |
report_to: wandb
|
| 35 |
-
|
| 36 |
domain:
|
| 37 |
name: general_knowledge
|
| 38 |
system_instruction: null
|
| 39 |
thinking_mode: true
|
| 40 |
benchmark: knowledge
|
| 41 |
-
chat_template_path: null
|
| 42 |
seed: 42
|
| 43 |
run_id: ${now:%Y%m%d_%H%M%S}
|
| 44 |
output_dir: ${oc.env:FLAB_SCRATCH,/scratch}/checkpoints/${domain.name}/${training.recipe}/${run_id}
|
|
@@ -62,7 +62,7 @@ es:
|
|
| 62 |
base_model_dir: null
|
| 63 |
data: null
|
| 64 |
rlvr:
|
| 65 |
-
base_model_dir:
|
| 66 |
dry_run: false
|
| 67 |
hf_push:
|
| 68 |
enabled: false
|
|
|
|
| 5 |
attn_impl: flash_attention_2
|
| 6 |
max_model_len: 4096
|
| 7 |
data:
|
| 8 |
+
name: general_knowledge_bare_mc_sft
|
| 9 |
+
loader: load_general_knowledge_sft
|
| 10 |
kwargs:
|
| 11 |
+
bare_letter: true
|
| 12 |
+
n_mmlu_pro: null
|
| 13 |
+
n_mmlu: 25000
|
| 14 |
n_arc: null
|
| 15 |
+
n_medmcqa: 5000
|
| 16 |
+
n_gpqa: null
|
| 17 |
+
n_sciq: 0
|
| 18 |
+
n_scienceqa: 0
|
| 19 |
+
max_total_tokens: 3500
|
| 20 |
seed: 0
|
| 21 |
training:
|
| 22 |
+
recipe: sft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
epochs: 1
|
| 24 |
per_device_train_batch_size: 1
|
| 25 |
+
gradient_accumulation_steps: 16
|
| 26 |
+
learning_rate: 5.0e-06
|
| 27 |
+
warmup_ratio: 0.03
|
| 28 |
lr_scheduler_type: cosine
|
| 29 |
gradient_checkpointing: true
|
| 30 |
bf16: true
|
|
|
|
|
|
|
|
|
|
| 31 |
max_seq_length: 4096
|
| 32 |
+
logging_steps: 10
|
| 33 |
+
save_steps: 500
|
| 34 |
+
save_total_limit: 2
|
| 35 |
report_to: wandb
|
| 36 |
+
deepspeed: null
|
| 37 |
domain:
|
| 38 |
name: general_knowledge
|
| 39 |
system_instruction: null
|
| 40 |
thinking_mode: true
|
| 41 |
benchmark: knowledge
|
|
|
|
| 42 |
seed: 42
|
| 43 |
run_id: ${now:%Y%m%d_%H%M%S}
|
| 44 |
output_dir: ${oc.env:FLAB_SCRATCH,/scratch}/checkpoints/${domain.name}/${training.recipe}/${run_id}
|
|
|
|
| 62 |
base_model_dir: null
|
| 63 |
data: null
|
| 64 |
rlvr:
|
| 65 |
+
base_model_dir: null
|
| 66 |
dry_run: false
|
| 67 |
hf_push:
|
| 68 |
enabled: false
|
hydra/.hydra/hydra.yaml
CHANGED
|
@@ -112,20 +112,14 @@ hydra:
|
|
| 112 |
hydra:
|
| 113 |
- hydra.mode=RUN
|
| 114 |
task:
|
| 115 |
-
- rlvr.base_model_dir=/scratch/checkpoints/general_knowledge/sft/20260519_023851
|
| 116 |
- domain=general_knowledge
|
| 117 |
-
- data=
|
| 118 |
-
- training=rlvr
|
| 119 |
-
- training.temperature=1.0
|
| 120 |
-
- training.num_generations=8
|
| 121 |
-
- training.gradient_accumulation_steps=8
|
| 122 |
-
- training.max_completion_length=256
|
| 123 |
-
- training.learning_rate=1e-6
|
| 124 |
- training.deepspeed=null
|
|
|
|
| 125 |
job:
|
| 126 |
-
name:
|
| 127 |
chdir: false
|
| 128 |
-
override_dirname: data=
|
| 129 |
id: ???
|
| 130 |
num: ???
|
| 131 |
config_name: base
|
|
@@ -139,22 +133,22 @@ hydra:
|
|
| 139 |
runtime:
|
| 140 |
version: 1.3.2
|
| 141 |
version_base: '1.3'
|
| 142 |
-
cwd: /scratch/runs/cs552-ammar-g07-
|
| 143 |
config_sources:
|
| 144 |
- path: hydra.conf
|
| 145 |
schema: pkg
|
| 146 |
provider: hydra
|
| 147 |
-
- path: /scratch/runs/cs552-ammar-g07-
|
| 148 |
schema: file
|
| 149 |
provider: main
|
| 150 |
- path: ''
|
| 151 |
schema: structured
|
| 152 |
provider: schema
|
| 153 |
-
output_dir: /scratch/checkpoints/general_knowledge/
|
| 154 |
choices:
|
| 155 |
domain: general_knowledge
|
| 156 |
-
training:
|
| 157 |
-
data:
|
| 158 |
model: qwen3_17b
|
| 159 |
hydra/env: default
|
| 160 |
hydra/callbacks: null
|
|
|
|
| 112 |
hydra:
|
| 113 |
- hydra.mode=RUN
|
| 114 |
task:
|
|
|
|
| 115 |
- domain=general_knowledge
|
| 116 |
+
- data=general_knowledge_bare_mc_sft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
- training.deepspeed=null
|
| 118 |
+
- training.epochs=1
|
| 119 |
job:
|
| 120 |
+
name: sft
|
| 121 |
chdir: false
|
| 122 |
+
override_dirname: data=general_knowledge_bare_mc_sft,domain=general_knowledge,training.deepspeed=null,training.epochs=1
|
| 123 |
id: ???
|
| 124 |
num: ???
|
| 125 |
config_name: base
|
|
|
|
| 133 |
runtime:
|
| 134 |
version: 1.3.2
|
| 135 |
version_base: '1.3'
|
| 136 |
+
cwd: /scratch/runs/cs552-ammar-g07-sft-bare-043837
|
| 137 |
config_sources:
|
| 138 |
- path: hydra.conf
|
| 139 |
schema: pkg
|
| 140 |
provider: hydra
|
| 141 |
+
- path: /scratch/runs/cs552-ammar-g07-sft-bare-043837/configs
|
| 142 |
schema: file
|
| 143 |
provider: main
|
| 144 |
- path: ''
|
| 145 |
schema: structured
|
| 146 |
provider: schema
|
| 147 |
+
output_dir: /scratch/checkpoints/general_knowledge/sft/20260519_023851/hydra
|
| 148 |
choices:
|
| 149 |
domain: general_knowledge
|
| 150 |
+
training: sft
|
| 151 |
+
data: general_knowledge_bare_mc_sft
|
| 152 |
model: qwen3_17b
|
| 153 |
hydra/env: default
|
| 154 |
hydra/callbacks: null
|
hydra/.hydra/overrides.yaml
CHANGED
|
@@ -1,10 +1,4 @@
|
|
| 1 |
-
- rlvr.base_model_dir=/scratch/checkpoints/general_knowledge/sft/20260519_023851
|
| 2 |
- domain=general_knowledge
|
| 3 |
-
- data=
|
| 4 |
-
- training=rlvr
|
| 5 |
-
- training.temperature=1.0
|
| 6 |
-
- training.num_generations=8
|
| 7 |
-
- training.gradient_accumulation_steps=8
|
| 8 |
-
- training.max_completion_length=256
|
| 9 |
-
- training.learning_rate=1e-6
|
| 10 |
- training.deepspeed=null
|
|
|
|
|
|
|
|
|
| 1 |
- domain=general_knowledge
|
| 2 |
+
- data=general_knowledge_bare_mc_sft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
- training.deepspeed=null
|
| 4 |
+
- training.epochs=1
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3441185608
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41251f54c85a6b5eac3e543941bad3a5d7f1d56fb4c8763039fbb50258fb3eeb
|
| 3 |
size 3441185608
|
tokenizer_config.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"<|image_pad|>",
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
-
"is_local":
|
| 24 |
"local_files_only": false,
|
| 25 |
"model_max_length": 131072,
|
| 26 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 20 |
"<|image_pad|>",
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
+
"is_local": false,
|
| 24 |
"local_files_only": false,
|
| 25 |
"model_max_length": 131072,
|
| 26 |
"pad_token": "<|endoftext|>",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34815d74f6662a90112fe9becd3fda7c5403640e96e70671c8171023a080f476
|
| 3 |
+
size 5777
|