Text Generation
Transformers
Safetensors
English
Hindi
qwen2
qwen
nano
conversational
text-generation-inference
Instructions to use kd13/Type-o1-nano-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kd13/Type-o1-nano-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kd13/Type-o1-nano-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kd13/Type-o1-nano-instruct") model = AutoModelForCausalLM.from_pretrained("kd13/Type-o1-nano-instruct", 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 kd13/Type-o1-nano-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kd13/Type-o1-nano-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kd13/Type-o1-nano-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kd13/Type-o1-nano-instruct
- SGLang
How to use kd13/Type-o1-nano-instruct 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 "kd13/Type-o1-nano-instruct" \ --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": "kd13/Type-o1-nano-instruct", "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 "kd13/Type-o1-nano-instruct" \ --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": "kd13/Type-o1-nano-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kd13/Type-o1-nano-instruct with Docker Model Runner:
docker model run hf.co/kd13/Type-o1-nano-instruct
| license: mit | |
| language: | |
| - en | |
| - hi | |
| base_model: | |
| - Qwen/Qwen2.5-0.5B | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| tags: | |
| - qwen | |
| - nano | |
| # Type-o1-nano-instruct | |
| A very compact general-purpose instruct model designed for lightweight assistant use across everyday tasks — general chat, Python coding help, writing and content generation, language tasks, math, and tool-style web search workflows. | |
| The model is intended for small-footprint deployments where users need clear, practical answers and helpful explanations without the cost of a larger model. | |
| ## Capabilities | |
| This model can help with: | |
| * General chat and multi-turn conversation | |
| * Python coding assistance and code explanation | |
| * Mathematics and basic quantitative reasoning | |
| * Engineering concepts and explanations | |
| * Creative writing (stories, poetry, writing prompts) | |
| * Content generation (marketing copy, social media captions, emails) | |
| * English grammar correction and rewriting | |
| * Advanced NLP tasks: | |
| * Fill-mask | |
| * Table question answering | |
| * Context-based question answering (SQuAD style) | |
| * Summarization (dialogue, news, and scientific papers) | |
| * English ↔ Hindi translation | |
| * Web search tool-call style conversations | |
| ## Chat Format | |
| The model follows a Harmony-style chat structure. | |
| Supported interaction flow: | |
| ```text | |
| system -> developer -> user -> tool call -> tool result -> final response | |
| ``` | |
| For normal chat use, you can use a standard chat-template style prompt. | |
| ## Web Search Tool-Call Style | |
| The model can be used in tool-calling style conversations where the assistant decides when a search is needed, emits a tool call, receives a tool result, and then writes the final answer. | |
| Example structure: | |
| ```text | |
| system: You are a helpful assistant with access to web search. | |
| user: Find the latest information about a topic. | |
| assistant tool call: web_search(...) | |
| tool result: ... | |
| assistant final: Answer using the search result. | |
| ``` | |
| Actual tool execution depends on your inference framework or application wrapper. | |
| ## Recommended Use Cases | |
| This model is best suited for: | |
| * Lightweight general-purpose assistants | |
| * On-device or low-resource deployments | |
| * Writing and content generation helpers | |
| * Grammar and language correction tools | |
| * English ↔ Hindi translation helpers | |
| * Summarization and document Q&A tools | |
| * Beginner Python learning assistants | |
| * Tool-call research experiments | |
| * Chatbots where speed and small size matter more than depth | |
| ## Limitations | |
| This model is not recommended for: | |
| * Production-critical software generation without review | |
| * Non-Python coding tasks such as C++, Java, Rust, Go, or JavaScript | |
| * Security-sensitive code generation | |
| * Medical, legal, or financial decision-making | |
| * Advanced or research-level mathematics | |
| * Long multi-file software engineering tasks | |
| * Tasks requiring very long context | |
| * High-stakes factual lookup without verification | |
| The model may sometimes: | |
| * Produce incorrect facts or reasoning | |
| * Miss edge cases | |
| * Over-explain simple questions | |
| * Generate code that needs testing | |
| * Struggle with very long context | |
| * Use tool-call format inconsistently depending on the prompt | |
| * Give uneven quality across its supported domains | |
| Being a very small model, it is best used for straightforward tasks rather than complex or nuanced ones. Always verify important outputs and test generated code before using it. | |
| ## License | |
| Please check the model repository license before commercial or production use. | |
| ## Disclaimer | |
| This model is an experimental small general-purpose assistant. It should be used as a helpful assistant, not as a guaranteed source of truth. For important tasks, verify outputs with tests, documentation, and human review. |