Views
No views yet
| Parameter | Value |
|---|---|
| direction_index | per layer |
| attn.o_proj.max_weight | 1.19 |
| attn.o_proj.max_weight_position | 29.93 |
| attn.o_proj.min_weight | 0.84 |
| attn.o_proj.min_weight_distance | 20.60 |
| mlp.down_proj.max_weight | 1.40 |
| mlp.down_proj.max_weight_position | 30.13 |
| mlp.down_proj.min_weight | 1.40 |
| mlp.down_proj.min_weight_distance | 19.53 |
| Metric | This model | Original model (ServiceNow-AI/Apriel-Nemotron-15b-Thinker) |
|---|---|---|
| KL divergence | 0.0125 | 0 (by definition) |
| Refusals | 9/100 | 95/100 |

/ˈɑː.pri.əl/


pip install transformers1import re
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_name = "ServiceNow-AI/Apriel-Nemotron-15b-Thinker"
5
6# load the tokenizer and the model
7tokenizer = AutoTokenizer.from_pretrained(model_name)
8model = AutoModelForCausalLM.from_pretrained(
9 model_name,
10 torch_dtype="auto",
11 device_map="auto"
12)
13
14# prepare the model input
15prompt = "Positive real numbers $x$ and $y$ satisfy $y^3=x^2$ and $(y-x)^2=4y^2$. What is $x+y$?\nMark your solution with \\boxed"
16messages = [
17 {"role": "user", "content": prompt}
18]
19
20tools = []
21
22text = tokenizer.apply_chat_template(
23 messages,
24 tokenize=False,
25 add_generation_prompt=True,
26 tools=tools
27)
28model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
29
30# conduct text completion
31generated_ids = model.generate(
32 **model_inputs,
33 max_new_tokens=65536
34)
35output = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
36
37# parsing the response
38response = re.findall(r"\[BEGIN FINAL RESPONSE\](.*?)\[END FINAL RESPONSE\]", output, re.DOTALL)[0].strip()
39print("output:", output)
40print("response:", response)<|system|>
You are a thoughtful and systematic AI assistant built by ServiceNow Language Models (SLAM) lab. Before providing an answer, analyze the problem carefully and present your reasoning step by step. After explaining your thought process, provide the final solution in the following format: [BEGIN FINAL RESPONSE] ... [END FINAL RESPONSE].
<|end|>
<|user|>
# user message here
<|end|>
<|assistant|>
Here are my reasoning steps:
# thoughts here
[BEGIN FINAL RESPONSE]
# assistant response here
[END FINAL RESPONSE]
<|end|>[BEGIN FINAL RESPONSE] and [END FINAL RESPONSE]. Here is a code snippet demonstrating the application of the chat template:1from transformers import AutoTokenizer
2model_name = "ServiceNow-AI/Apriel-Nemotron-15b-Thinker"
3tokenizer = AutoTokenizer.from_pretrained(model_name)
4
5# prepare the model input
6custom_system_prompt = "Answer like a pirate."
7prompt = "You are an expert assistant in the implementation of customer experience management aspect of retail applications \n \nYou will be using Python as the programming language. \n \nYou will utilize a factory design pattern for the implementation and following the dependency inversion principle \n \nYou will modify the implementation based on user requirements. \n \nUpon user request, you will add, update, and remove the features & enhancements in the implementation provided by you. \n \nYou will ask whether the user wants to refactor the provided code or needs a sample implementation for reference. Upon user confirmation, I will proceed accordingly. \n \n**Guidelines:** \n 1. **User Requirements:** \n - You have to ask users about their requirements, clarify the user expectations, and suggest the best possible solution by providing examples of Python code snippets. \n - Ask users about which type of reports they need to assess the AI model's performance, accuracy, and reliability. \n - After providing the solution, you have to ask the user about the trial of the solution and modify the solution based on the user feedback. \n \n 2. **Libraries/Frameworks:** \n - You will be utilizing Python as a programming language. \n - You will be using Flask framework for REST APIS implementation \n \n 3. **Communication Gesture:** \n - Your conversation with the user should be interactive, supportive, courageous, and professional. \n - You have to break down the complex concepts into sub-concepts and try to explain them to the user. \n - You have to ask the user for the required parameters. If the user refuses to provide in 2 attempts, politely exit the conversation. \n - You have to provide your supported parameters to the user, if the user refuses to accept them then you have to put an apology note and exit the conversation. \n - You have to track the conversation about unasked questions by the user. If some/one of the questions remain then you have to remind the user about these questions and proceed to answer them based on the user's confirmation \n \n 4. **Implementation:** \n - Your code/implementations should be reliable, scaleable, modular, and reusable. \n - You will be providing unit tests for the implementation upon user request. \n - You will be following MVC architecture for the applications \n - Your implementations must be well-commented and readable \n \n \n- Today's date is 23rd August 2024. \n- The default sender email is sender-assistant@email.com.\nHi, I am conducting research on retail customer feedback systems and I need assistance with designing and implementing them. Could you kindly provide me with a list of general customer feedback system modules?"
8messages = [
9 {"role": "user", "content": custom_system_prompt + "\n\n" + prompt}
10]
11# example tools
12tools = [{"type": "function", "function": {"name": "getRetailFeedbackModules", "description": "Returns the list of modules usually present in the retail industry", "parameters": {"type": "object", "properties": {"page": {"type": "integer", "description": "The current page number.", "default": 1}, "page_size": {"type": "integer", "description": "The number of items per page.", "default": 3}}}}}, {"type": "function", "function": {"name": "verifyImplementation", "description": "Returns the list of modules usually present in the retail industry", "parameters": {"type": "object", "properties": {"coding_language": {"type": "string", "description": "The supported languages for verification of implementation.", "default": "python", "enum": ["python", "java", "php"]}, "code": {"type": "string", "description": "The code which needs verification"}, "design_pattern": {"type": "string", "description": "The design pattern to verify in the implementation", "enum": ["factory", "strategy", "singleton"]}, "verify_best_practices": {"type": "boolean", "description": "The verification of the coding style based on the language selected", "default": true}}}}}]
13text = tokenizer.apply_chat_template(
14 messages,
15 tokenize=False,
16 add_generation_prompt=True,
17 tools=tools
18)
19model_inputs = tokenizer([text], return_tensors="pt")0.6.Here are my reasoning steps:\n during all our evaluations. This is implemented in the default chat template.We thank researchers at Nvidia for sharing detailed insights and data from their work in building reasoners! This greatly accelerated our research and we recognize the same with our model naming convention!
1@misc{radhakrishna2025aprielnemotron15bthinker,
2 title={Apriel-Nemotron-15B-Thinker},
3 author={Shruthan Radhakrishna and Soham Parikh and Gopal Sarda and Anil Turkkan and Quaizar Vohra and Raymond Li and Dhruv Jhamb and Kelechi Ogueji and Aanjaneya Shukla and Oluwanifemi Bamgbose and Toby Liang and Luke Kumar and Oleksiy Ostapenko and Shiva Krishna Reddy Malay and Aman Tiwari and Tara Bogavelli and Vikas Yadav and Jash Mehta and Saloni Mittal and Akshay Kalkunte and Pulkit Pattnaik and Khalil Slimi and Anirudh Sreeram and Jishnu Nair and Akintunde Oladipo and Shashank Maiya and Khyati Mahajan and Rishabh Maheshwary and Masoud Hashemi and Sai Rajeswar Mudumba and Sathwik Tejaswi Madhusudhan and Torsten Scholak and Sebastien Paquet and Sagar Davasam and Srinivas Sunkara},
4 year={2025},
5 eprint={2508.10948},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}