Instructions to use cs-552-2026-OAAA/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-OAAA/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-OAAA/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-OAAA/general_knowledge_model") model = AutoModelForCausalLM.from_pretrained("cs-552-2026-OAAA/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=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-OAAA/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-OAAA/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-OAAA/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs-552-2026-OAAA/general_knowledge_model
- SGLang
How to use cs-552-2026-OAAA/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-OAAA/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-OAAA/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-OAAA/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-OAAA/general_knowledge_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cs-552-2026-OAAA/general_knowledge_model with Docker Model Runner:
docker model run hf.co/cs-552-2026-OAAA/general_knowledge_model
Backup: explanation SFT model, 12k examples
Browse files- chat_template.jinja +0 -6
- config.json +2 -2
- generation_config.json +1 -1
- model.safetensors +1 -1
- tokenizer.json +2 -2
- tokenizer_config.json +5 -1
chat_template.jinja
CHANGED
|
@@ -1,9 +1,3 @@
|
|
| 1 |
-
{# SUFFIX_ONLY_BOXED_HF_V1 #}
|
| 2 |
-
{%- set enable_thinking = true %}
|
| 3 |
-
{%- if messages[0].role != 'system' %}
|
| 4 |
-
{%- set messages = [{'role': 'system', 'content': 'Explain the answer briefly and compare the relevant choices when useful. End with exactly one final answer in the format \\boxed{LETTER}. The box must contain only the option letter.'}] + messages %}
|
| 5 |
-
{%- endif %}
|
| 6 |
-
{%- set enable_thinking = true %}
|
| 7 |
{%- if tools %}
|
| 8 |
{{- '<|im_start|>system\n' }}
|
| 9 |
{%- if messages[0].role == 'system' %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{%- if tools %}
|
| 2 |
{{- '<|im_start|>system\n' }}
|
| 3 |
{%- if messages[0].role == 'system' %}
|
config.json
CHANGED
|
@@ -56,8 +56,8 @@
|
|
| 56 |
},
|
| 57 |
"sliding_window": null,
|
| 58 |
"tie_word_embeddings": true,
|
| 59 |
-
"transformers_version": "5.
|
| 60 |
-
"use_cache":
|
| 61 |
"use_sliding_window": false,
|
| 62 |
"vocab_size": 151936
|
| 63 |
}
|
|
|
|
| 56 |
},
|
| 57 |
"sliding_window": null,
|
| 58 |
"tie_word_embeddings": true,
|
| 59 |
+
"transformers_version": "5.7.0",
|
| 60 |
+
"use_cache": true,
|
| 61 |
"use_sliding_window": false,
|
| 62 |
"vocab_size": 151936
|
| 63 |
}
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"eos_token_id": 151645,
|
| 4 |
"max_new_tokens": 4096,
|
| 5 |
"pad_token_id": 151643,
|
| 6 |
-
"transformers_version": "5.
|
| 7 |
}
|
|
|
|
| 3 |
"eos_token_id": 151645,
|
| 4 |
"max_new_tokens": 4096,
|
| 5 |
"pad_token_id": 151643,
|
| 6 |
+
"transformers_version": "5.7.0"
|
| 7 |
}
|
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:169ad53ec313c3a34b06c0809216e4fc072cce444a5d4ff2b59690d064130ed5
|
| 3 |
size 3441185608
|
tokenizer.json
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:edfc0debec846c25f2dd452061f7725bf5b66336912a33ba1ec10ebd6c4b49cf
|
| 3 |
+
size 11422749
|
tokenizer_config.json
CHANGED
|
@@ -20,11 +20,15 @@
|
|
| 20 |
"<|image_pad|>",
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
-
"is_local":
|
| 24 |
"local_files_only": false,
|
|
|
|
| 25 |
"model_max_length": 131072,
|
| 26 |
"pad_token": "<|endoftext|>",
|
| 27 |
"split_special_tokens": false,
|
|
|
|
| 28 |
"tokenizer_class": "Qwen2Tokenizer",
|
|
|
|
|
|
|
| 29 |
"unk_token": null
|
| 30 |
}
|
|
|
|
| 20 |
"<|image_pad|>",
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
+
"is_local": true,
|
| 24 |
"local_files_only": false,
|
| 25 |
+
"max_length": 1536,
|
| 26 |
"model_max_length": 131072,
|
| 27 |
"pad_token": "<|endoftext|>",
|
| 28 |
"split_special_tokens": false,
|
| 29 |
+
"stride": 0,
|
| 30 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 31 |
+
"truncation_side": "right",
|
| 32 |
+
"truncation_strategy": "longest_first",
|
| 33 |
"unk_token": null
|
| 34 |
}
|