Instructions to use KR-16/broken-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KR-16/broken-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KR-16/broken-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("KR-16/broken-model") model = AutoModelForCausalLM.from_pretrained("KR-16/broken-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 KR-16/broken-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KR-16/broken-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": "KR-16/broken-model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KR-16/broken-model
- SGLang
How to use KR-16/broken-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 "KR-16/broken-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": "KR-16/broken-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 "KR-16/broken-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": "KR-16/broken-model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KR-16/broken-model with Docker Model Runner:
docker model run hf.co/KR-16/broken-model
Download Q2_PartB.py from KR-16/broken-model: direct link, hf CLI and curl.
- Browser
- Download file 2.71 kB
-
https://huggingface.co/KR-16/broken-model/resolve/main/Q2_PartB.py
- Command line
-
hf download hf://KR-16/broken-model/Q2_PartB.py
-
curl -L -o Q2_PartB.py https://huggingface.co/KR-16/broken-model/resolve/main/Q2_PartB.py
2.71 kB
| """ | |
| Q2 Part B: reasoning_effort Parameter Analysis | |
| Problem: | |
| -------- | |
| When users include a reasoning_effort parameter in requests to this model, it has | |
| no observable effect on the generated output. | |
| Root Cause: | |
| ----------- | |
| • The model (Qwen3ForCausalLM) is a standard causal language model, not a reasoning-capable | |
| model. Only specialized models like OpenAI's o1 or o3 series support reasoning_effort. | |
| • The inference engine doesn't recognize or process the reasoning_effort parameter. It's | |
| either ignored or passed through without any logic to actually use it. | |
| • There's no code that maps the reasoning_effort value to any model generation parameters. | |
| • The model cannot generate intermediate reasoning tokens. Since it generates output tokens | |
| directly without a reasoning phase, there's nothing for the parameter to control. | |
| Requirements to Make reasoning_effort Functional: | |
| -------------------------------------------------- | |
| • Use a reasoning-capable model architecture: | |
| - Replace with o1, o3, or similar reasoning-capable models | |
| - Or fine-tune existing model to support reasoning token generation | |
| - Model must have built-in capability to generate reasoning tokens | |
| • Update the inference engine: | |
| - Add code to parse reasoning_effort parameter from API requests | |
| - Implement logic to generate reasoning tokens | |
| - Add token classification to distinguish reasoning tokens from output tokens | |
| - Map effort levels (low/medium/high) to reasoning parameters | |
| - Pass reasoning_effort to model's forward pass | |
| • Modify the API server: | |
| - Add reasoning_effort to request schema validation | |
| - Accept parameter from client requests | |
| - Pass parameter through to inference engine | |
| - Handle reasoning tokens separately in response formatting | |
| - Optionally return reasoning tokens in API response | |
| • Update model configuration: | |
| - Add reasoning_config section to config.json | |
| - Configure max_reasoning_tokens based on effort level | |
| - Specify reasoning token IDs | |
| - Define reasoning_effort_levels supported | |
| • Implement architectural changes: | |
| - Create token routing pipeline to separate reasoning and output tokens | |
| - Add logic to control reasoning depth/length based on effort level | |
| - Update token stream processing to handle reasoning vs output distinction | |
| Summary: | |
| -------- | |
| This isn't a simple configuration fix. It requires: | |
| • Architectural changes (reasoning-capable model + engine support) | |
| • Implementation changes (API server + token processing) | |
| • Configuration updates (model config + reasoning settings) | |
| The current model simply doesn't have the capability to support this feature. | |
| """ | |