Text Generation
Transformers
Safetensors
qwen3
general-knowledge
multiple-choice
reasoning
rejection-sampling
rft
lora
cs-552
conversational
text-generation-inference
Instructions to use cs-552-2026-centralesupechec/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-centralesupechec/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-centralesupechec/general_knowledge_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cs-552-2026-centralesupechec/general_knowledge_model") model = AutoModelForCausalLM.from_pretrained("cs-552-2026-centralesupechec/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-centralesupechec/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-centralesupechec/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-centralesupechec/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs-552-2026-centralesupechec/general_knowledge_model
- SGLang
How to use cs-552-2026-centralesupechec/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-centralesupechec/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-centralesupechec/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-centralesupechec/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-centralesupechec/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cs-552-2026-centralesupechec/general_knowledge_model with Docker Model Runner:
docker model run hf.co/cs-552-2026-centralesupechec/general_knowledge_model
| { | |
| "add_prefix_space": false, | |
| "backend": "tokenizers", | |
| "bos_token": null, | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|im_end|>", | |
| "errors": "replace", | |
| "extra_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end|>", | |
| "<|object_ref_start|>", | |
| "<|object_ref_end|>", | |
| "<|box_start|>", | |
| "<|box_end|>", | |
| "<|quad_start|>", | |
| "<|quad_end|>", | |
| "<|vision_start|>", | |
| "<|vision_end|>", | |
| "<|vision_pad|>", | |
| "<|image_pad|>", | |
| "<|video_pad|>" | |
| ], | |
| "is_local": true, | |
| "local_files_only": false, | |
| "model_max_length": 131072, | |
| "pad_token": "<|endoftext|>", | |
| "split_special_tokens": false, | |
| "tokenizer_class": "Qwen2Tokenizer", | |
| "unk_token": null, | |
| "chat_template": "{#-\n General Knowledge — thinking-enabled chat template for Qwen3-1.7B.\n Allows the model to emit a <think>...</think> reasoning block first, then\n the final \\boxed{LETTER} answer.\n The CI calls:\n tokenizer.apply_chat_template(messages, add_generation_prompt=True)\n with no extra kwargs, so any behaviour we want must be encoded here.\n-#}\n{%- set gk_system = \"You are a knowledge expert. Read the question and the labelled options carefully. Reason step by step inside <think> ... </think>, then choose exactly one option. End your reply with the letter of the correct option wrapped in \\\\boxed{}, e.g. \\\\boxed{C}. Do not output anything after the boxed answer.\" -%}\n{%- if messages[0].role == 'system' -%}\n {{- '<|im_start|>system\\n' + messages[0].content + '\\n\\n' + gk_system + '<|im_end|>\\n' -}}\n {%- set messages = messages[1:] -%}\n{%- else -%}\n {{- '<|im_start|>system\\n' + gk_system + '<|im_end|>\\n' -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message.role == 'user' -%}\n {{- '<|im_start|>user\\n' + message.content + '<|im_end|>\\n' -}}\n {%- elif message.role == 'assistant' -%}\n {{- '<|im_start|>assistant\\n' + message.content + '<|im_end|>\\n' -}}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- '<|im_start|>assistant\\n<think>\\n' -}}\n{%- endif -%}\n" | |
| } |