Instructions to use JinnP/Qwen3-8B-Kernelbook-SFT-HF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JinnP/Qwen3-8B-Kernelbook-SFT-HF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JinnP/Qwen3-8B-Kernelbook-SFT-HF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JinnP/Qwen3-8B-Kernelbook-SFT-HF") model = AutoModelForCausalLM.from_pretrained("JinnP/Qwen3-8B-Kernelbook-SFT-HF") 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
- vLLM
How to use JinnP/Qwen3-8B-Kernelbook-SFT-HF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JinnP/Qwen3-8B-Kernelbook-SFT-HF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JinnP/Qwen3-8B-Kernelbook-SFT-HF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JinnP/Qwen3-8B-Kernelbook-SFT-HF
- SGLang
How to use JinnP/Qwen3-8B-Kernelbook-SFT-HF 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 "JinnP/Qwen3-8B-Kernelbook-SFT-HF" \ --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": "JinnP/Qwen3-8B-Kernelbook-SFT-HF", "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 "JinnP/Qwen3-8B-Kernelbook-SFT-HF" \ --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": "JinnP/Qwen3-8B-Kernelbook-SFT-HF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JinnP/Qwen3-8B-Kernelbook-SFT-HF with Docker Model Runner:
docker model run hf.co/JinnP/Qwen3-8B-Kernelbook-SFT-HF
Qwen3-8B-Kernelbook-SFT (HuggingFace Format)
This is a fine-tuned version of Qwen3-8B using Supervised Fine-Tuning (SFT) on the filtered KernelBook dataset, optimized for kernel and system-level tasks.
Model Details
- Base Model: Qwen3-8B
- Training Method: Supervised Fine-Tuning (SFT)
- Training Framework: SLIME (Megatron-LM based)
- Training Data: Filtered KernelBook dataset (10,000 high-quality samples)
- Model Size: 8.2B parameters
- Format: HuggingFace Transformers compatible
- Checkpoint: Iteration 515
Repository Links
- This Repository: HuggingFace format - ready for inference with Transformers, vLLM, SGLang, etc.
- Megatron Format: JinnP/Qwen3-8B-Kernelbook-SFT-filtered - for continued training with Megatron-LM
Usage
Quick Start with Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "JinnP/Qwen3-8B-Kernelbook-SFT-HF"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
# Example usage
prompt = "Explain how the Linux kernel handles memory management:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=500)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Using with vLLM
from vllm import LLM, SamplingParams
llm = LLM(model="JinnP/Qwen3-8B-Kernelbook-SFT-HF")
sampling_params = SamplingParams(temperature=0.7, max_tokens=500)
prompts = ["Describe the process scheduling algorithm in Linux kernel"]
outputs = llm.generate(prompts, sampling_params)
Training Details
This model was fine-tuned using the SLIME framework on filtered KernelBook data specifically curated for kernel and system programming tasks. The training focused on:
- Kernel internals and system calls
- Memory management and process scheduling
- Device drivers and I/O systems
- File systems and networking stack
- Performance optimization and debugging
Model Performance
The fine-tuned model shows improved performance on:
- Kernel code generation and explanation
- System-level debugging scenarios
- Performance optimization recommendations
- Operating system concept explanations
License
This model inherits the Apache 2.0 license from the base Qwen3-8B model. Please refer to the original Qwen3 license for usage terms.
Citation
If you use this model, please cite:
@misc{qwen3-kernelbook-sft,
title={Qwen3-8B-Kernelbook-SFT: Fine-tuned for Kernel and System Programming},
author={JinnP},
year={2024},
publisher={HuggingFace}
}
And the original Qwen3 model:
@article{qwen3,
title={Qwen3 Technical Report},
author={Qwen Team},
year={2024}
}
Acknowledgments
- Base model: Qwen Team for Qwen3-8B
- Training data: KernelBook dataset
- Training framework: SLIME (Megatron-LM based)
- Downloads last month
- 3