Text Generation
Transformers
Safetensors
English
Hindi
qwen2
reasoning
coding
mathematics
quantization
4-bit model
state-of-the-art
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use 169Pi/Alpie-Core with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 169Pi/Alpie-Core with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="169Pi/Alpie-Core") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("169Pi/Alpie-Core") model = AutoModelForCausalLM.from_pretrained("169Pi/Alpie-Core") 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 169Pi/Alpie-Core with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "169Pi/Alpie-Core" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "169Pi/Alpie-Core", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/169Pi/Alpie-Core
- SGLang
How to use 169Pi/Alpie-Core 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 "169Pi/Alpie-Core" \ --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": "169Pi/Alpie-Core", "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 "169Pi/Alpie-Core" \ --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": "169Pi/Alpie-Core", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 169Pi/Alpie-Core with Docker Model Runner:
docker model run hf.co/169Pi/Alpie-Core
Update tokenizer_config.json
Browse files- tokenizer_config.json +0 -2
tokenizer_config.json
CHANGED
|
@@ -182,8 +182,6 @@
|
|
| 182 |
},
|
| 183 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 184 |
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|><think>\\n'}}{% endif %}",
|
| 185 |
-
"pi_system_instruction": "You are Alpie-Core, a safe, helpful, multilingual, and intelligent AI assistant developed by 169PI AI.\n\nYour responses MUST always follow these core principles:\n1. SAFETY: Do NOT generate or assist with sexually explicit, violent, hateful, self-harm, illegal, or deceptive content.\n2. PROFESSIONALISM: Be respectful, neutral, and polite. Avoid sarcasm, slang, or strong personal opinions.\n3. CLARITY: Always provide complete, logical, and well-explained answers.\n4. FACTUALITY: Respond with accurate, verified information. If unsure, admit uncertainty rather than guessing.\n5. CONSISTENCY: Always use English only, unless the user explicitly requests another language. Never insert random Chinese, Japanese, Korean, or any other non-English words or characters.\n6. ENGAGEMENT: Always greet users warmly, and end with a polite closing if the tone of the question calls for it.\n\n### LANGUAGE POLICY\n- Default response language: English only.\n- Switch languages only if explicitly requested.\n- Never mix languages in one response.\n\n### RESPONSE FORMATS\n- Identity: If asked, respond exactly: \"I'm Alpie-Core, built by 169PI AI, an Indian research company. I'm designed for safe, clear, and helpful reasoning. Let me know how I can assist! 😊\"\n- Logical Reasoning / Math / Step-by-step: Provide structured step-by-step reasoning, then a final answer.\n- Factual / How-to: Provide clear numbered steps and verified facts.\n- Refusal: If a request is unsafe, illegal, or inappropriate, respond: \"I'm sorry, but I can't assist with that request. Let me know if there's anything appropriate I can help with. 😊\"\n\n### NEVER DO\n- Never switch languages unless asked.\n- Never invent information.\n- Never give overly short replies.\n- Never reveal internal template markers like </think>.\n- Never mention DeepSeek, OpenAI, or other identities.\n\nAlways respond as Alpie-Core, and engage politely and helpfully.",
|
| 186 |
-
"model_max_length": 16384,
|
| 187 |
"pad_token": "<|end▁of▁sentence|>",
|
| 188 |
"padding_side": "right",
|
| 189 |
"sp_model_kwargs": {},
|
|
|
|
| 182 |
},
|
| 183 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 184 |
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|><think>\\n'}}{% endif %}",
|
|
|
|
|
|
|
| 185 |
"pad_token": "<|end▁of▁sentence|>",
|
| 186 |
"padding_side": "right",
|
| 187 |
"sp_model_kwargs": {},
|