Bring Your Own Codegen to TVM
codegen ● Template path: python/tvm/relay/op/contrib//extern_op.py ● Boolean functions in the template def conv2d(attrs, args): return is_float32(args) Relay operator name Operator well Return True/False for this op After Annotation op op op op data weight1 weight3 weight2 output Subgraph begin Subgraph end© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example: Annotate an Entire Graph After Annotation op op op op data weight1 weight3 weight2 output Subgraph begin Subgraph end class WholeGraphAnnotator(ExprMutator): def __init__(self, target): 0 码力 | 19 页 | 504.69 KB | 5 月前3OpenAI 《A practical guide to building agents》
works like a checklist, flagging transactions based on preset criteria. In contrast, an LLM agent functions more like a seasoned investigator, evaluating context, considering subtle patterns, and identifying components: 01 Model The LLM powering the agent’s reasoning and decision-making 02 Tools External functions or APIs the agent can use to take action 03 Instructions Explicit guidelines and guardrails defining save_results(output): db.insert({ : output, : datetime.time()}) return "File saved" search_agent = Agent( name= , instructions= tools=[WebSearchTool(),save_results], ) "output" "timestamp"0 码力 | 34 页 | 7.00 MB | 5 月前3Trends Artificial Intelligence
model with 70B parameters 5/24: Google introduces AI overviews to augment its search functions 9/24: Alibaba releases 100 open-source Qwen 2.5 models, with performance in line with do more... I believe long term, we will see people coupled with… the AI they use as the overall output of that person. - Roblox Co-Founder, President, CEO & Chair of Board David Baszucki @ Q1:25 Earnings Marketing Spend Effectivity ROIC Revenues Sales Productivity Customer Service Production / Output Revenue-Focused Cost-Focused ‘Traditional’ Enterprise AI Adoption = Rising Priority70 Enterprise0 码力 | 340 页 | 12.14 MB | 4 月前3TVM@Alibaba AI Labs
Al.Labs 阿里巴巴人工智能实验室 PowerVR support by TVM NNVM Compiler -Execution graph -Model layers functions Computation Graph Optimizations -Param TvM Tensor Operators & g, outs): bateh #Describe how to compute output by primitive 国定 Blocking0 码力 | 12 页 | 1.94 MB | 5 月前3Google 《Prompt Engineering v7》
Writer Joey Haymaker Designer Michael Lanning Introduction 6 Prompt engineering 7 LLM output configuration 8 Output length 8 Sampling controls 9 Temperature 9 Top-K and top-P 10 Putting it all together prompting? 54 Best Practices 54 Provide examples 54 Design with simplicity 55 Be specific about the output 56 Use Instructions over Constraints 56 Control the max token length 58 Use variables in prompts prompting with classification tasks, mix up the classes 59 Adapt to model updates 60 Experiment with output formats 60 JSON Repair 61 Working with Schemas 62 Experiment together with other prompt engineers0 码力 | 68 页 | 6.50 MB | 6 月前3DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model
We also evaluate DeepSeek-V2 Chat (SFT) and 4 … Router Input Hidden ???????????????????????? Output Hidden ???????????????????????? ′ 1 ???????????????????????? 1 2 ????????????????????????-1 ??? {[????????????????????????,???????????? ???????????? ; ???????????????????????? ????????????]} … Output Hidden ???????????????????????? … … … … … 1 … … … … apply RoPE apply RoPE Figure 2 | Illustration denote the query, key, and value of the ?-th attention head, respectively; ?? ∈ R?×?ℎ?ℎ denotes the output projection matrix. During inference, all keys and values need to be cached to accelerate inference0 码力 | 52 页 | 1.23 MB | 1 年前3Dynamic Model in TVM
loop, etc) ● Dynamic shapes ○ Dynamic inputs: batch size, image size, sequence length, etc. ○ Output shape of some ops are data dependent: arange, nms, etc. ○ Control flow: concatenate within a while at compilation time ● Register a shape function for operator to check the type and compute the output shape© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Gradual typing: shape at compilation time ● Register a shape function for operator to check the type and compute the output shape ● Shape function has two modes (op_attrs, input_tensors, out_ndims) -> out_shape_tensors ○0 码力 | 24 页 | 417.46 KB | 5 月前3XDNN TVM - Nov 2019
shape, inputs, lambda ins, outs: tvm.call_packed('tvm.accel.accel_fused', attrs['path'], attrs['output_layout'], attrs['model_name'], outs[0], *ins ), name=name) return out >> 10© Copyright 2018 Xilinx register_func("tvm.accel.accel_fused") def accel_fused(graph_path, output_layout, out, *ins ): path = c_char_p(graph_path.value).value layout = c_char_p(output_layout.value).value … >> 12© Copyright 2018 Xilinx0 码力 | 16 页 | 3.35 MB | 5 月前3TVM Meetup: Quantization
(%input_data: Tensor[(2, 5), float32]) { qnn.quantize(%input_data, out_dtype="uint8", output_zero_point=127, output_scale=0.5f) } def @main(%input_data: Tensor[(2, 5), float32]) -> Tensor[(2, 5), uint8]0 码力 | 19 页 | 489.50 KB | 5 月前3清华大学 DeepSeek+DeepResearch 让科研像聊天一样简单
commercialization, lithium-ion batteries (LIBs)have become mainstream energy storage devices with their high output voltage, high energy density, and long cycle life. In order to meet the strong demand for further have become the mainstream energy storage devices since their commercialization due to their high output voltage, high energy density, and long cycle life. Nevertheless, to meet the increasing demand for0 码力 | 85 页 | 8.31 MB | 7 月前3
共 12 条
- 1
- 2