{"id":54526,"date":"2022-02-01T07:10:51","date_gmt":"2022-02-01T07:10:51","guid":{"rendered":"https:\/\/career.huawei.ru\/rri\/en\/?p=54526"},"modified":"2023-04-11T12:37:11","modified_gmt":"2023-04-11T12:37:11","slug":"huawei-dnn-compressionacceleration-technical-challenge-uniform-quantizers","status":"publish","type":"post","link":"https:\/\/career.huawei.ru\/rri\/en\/events\/huawei-dnn-compressionacceleration-technical-challenge-uniform-quantizers\/","title":{"rendered":"Huawei DNN Compression&#038;Acceleration Technical Challenge. Uniform Quantizers"},"content":{"rendered":"<h3 style=\"text-align: center;\">Dear students of MSU [Faculty],<\/h3>\n<h3 style=\"text-align: center;\">Huawei Russian Research Institute invites you to\u00a0<strong>Tech Talk with Huawei R&#038;D<\/strong>\u00a0 for students of MSU [Faculty]!<\/h3>\n<p style=\"text-align: center;\"><strong>When:<\/strong> 23.03.2022, 16:00 &#8211; 18:00<\/p>\n<p style=\"text-align: center;\"><strong>Where:<\/strong> [Faculty] of Moscow State University, room. ___<\/p>\n<hr \/>\n<p style=\"text-align: center;\">As part of this event, we invite you to participate in the competition by solving the problem from <strong>Kirill Solodskikh<\/strong>, the main speaker of the event, engineer of the Huawei Russian Research Institute!<\/p>\n<p style=\"text-align: center;\">For a successful solution of the problem you will receive:<\/p>\n<p style=\"text-align: center;\">1st place \u2013 HUAWEI WATCH 3 Pro\u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/consumer-img.huawei.com\/content\/dam\/huawei-cbg-site\/common\/mkt\/pdp\/wearables\/watch-3-pro-leather\/img\/one\/huawei-watch-3-pro-kv.png\" alt=\"HUAWEI WATCH 3 Pro - HUAWEI KSA\" width=\"212\" height=\"117\" \/><\/p>\n<p style=\"text-align: center;\">2nd place \u2013 HUAWEI Freebuds Pro <img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/shop-cdn.huawei.com\/my\/pms\/product\/6941487202133\/800_800_F097541CE76EC642714ED00788C8BCBA5C03151AD5C0030Amp.png\" alt=\"HUAWEI FreeBuds Pro (Ceramic White) Bundle\" width=\"157\" height=\"157\" \/><\/p>\n<p style=\"text-align: center;\">3rd place \u2013 HUAWEI WATCH FIT <img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/eg.jumia.is\/unsafe\/fit-in\/680x680\/filters:fill(white)\/product\/49\/670432\/3.jpg?6124\" alt=\"Huawei Watch Fit - 1.64-inch Smart Watch - Graphite Black @ Best Price Online | Jumia Egypt\" width=\"128\" height=\"128\" \/><\/p>\n<hr \/>\n<h1><strong>Mean Squared Quantization Error<\/strong><\/h1>\n<hr \/>\n<p>Let us consider uniform quantization function de\ufb01ned in the following way:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-54527 aligncenter\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095037-300x109.jpg\" alt=\"\" width=\"300\" height=\"109\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095037-300x109.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095037.jpg 486w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>where &#8211; quantization segment, , &#8211; rounding of . Function rounds to the closest integer value which lies in segment . To adjust quantization segment for arbitrary data scales one could use quantization scale parameter in the following way . For instance, if some random variable lies in and we want represent these values using <strong>uint8<\/strong> data type ( ) for scale parameter we can take <strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-54528\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095419.jpg\" alt=\"\" width=\"77\" height=\"38\" \/><\/strong>. Resulted quantized random variable now presented as categorical random variable with <strong>uint8<\/strong> data type scaled by , i.e. . <strong>But how to measure what representation is better?<\/strong><\/p>\n<p>To answer on this question we need to de\ufb01ne some metric which shows how close quantized representation \u03beQ to\u00a0initial one. One of the natural metrics is <strong>Mean Squared Quantization Error (MSQE):<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-54529 aligncenter\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095659-300x104.jpg\" alt=\"\" width=\"407\" height=\"141\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095659-300x104.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-095659.jpg 740w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/p>\n<p>where \ufb01rst line de\ufb01nes quantization error for vectors and the second for continuous random variables with density function p\u03be.<\/p>\n<h1>Smooth Quantization Error<\/h1>\n<hr \/>\n<p>It is easy to see that function <em>Qu<\/em> has almost zero derivative what makes impossible to use it in smooth optimization algorithms as gradient descent. Let us de\ufb01ne the family of smooth quantization errors. We will say that function \u03d5(x):\u211d\u2192\u211d iff:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-54540 aligncenter\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-101830-300x100.jpg\" alt=\"\" width=\"720\" height=\"240\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-101830-300x100.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-101830-1024x341.jpg 1024w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-101830-768x256.jpg 768w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-101830.jpg 1350w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<p>The simple example of Smooth Quantization Error is the squared sinus wave glued together with square function. We will call this function as quantization sinus or simply QSin:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-54544 aligncenter\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102310-300x80.jpg\" alt=\"\" width=\"364\" height=\"97\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102310-300x80.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102310.jpg 584w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/p>\n<h1>Tasks for challenge<\/h1>\n<hr \/>\n<h3>Theoretical tasks<\/h3>\n<ol>\n<li>\u00a0Prove that QSin is a smooth quantization error.<\/li>\n<li>\u00a0Prove that any smooth quantization error (SQE) has the same number of local minimas as MSQE.<\/li>\n<li>\u00a0Prove that any SQE periodic on segment <img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-54545\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102542.jpg\" alt=\"\" width=\"87\" height=\"28\" \/><\/li>\n<li>\u00a0(*) Prove that for any SQE \u03d5 the following holds:<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-54546 aligncenter\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102708-300x112.jpg\" alt=\"\" width=\"407\" height=\"152\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102708-300x112.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-102708.jpg 754w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/p>\n<p>and \ufb01nd such constant for QSin.<\/p>\n<p>1. (*) Prove that for any random variable \u03be with smooth density p\u03be (x) with \ufb01nite \ufb01rst and second moments there exists at least one minima for the following optimization problems:<\/p>\n<p style=\"text-align: center;\">\u03d5[\u03be](s)\u2192min,MSQE[\u03be](s)\u2192min,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-54547 alignleft\" src=\"http:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-103137-300x33.jpg\" alt=\"\" width=\"309\" height=\"34\" srcset=\"https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-103137-300x33.jpg 300w, https:\/\/career.huawei.ru\/rri\/wp-content\/uploads\/2022\/02\/screenshot-2022-02-01-103137.jpg 548w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3>Coding tasks<\/h3>\n<p>1. Implement MSQE and QSin as loss functions in PyTorch.<\/p>\n<p>2. By sampling from standard normal \/ laplacian distribution plot the functions QSin[\u03be](s),MSQE[\u03be](s) for the following quantization segments: [-128, 127], [-8, 7], [-2, 1].<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p><strong>Please <\/strong><strong><span style=\"color: #993300;\">send your solution in pdf\/doc. format<\/span><\/strong><strong>,\u00a0<\/strong><strong><span style=\"text-decoration: underline;\">responding<\/span> to this topic.<\/strong><\/p>\n<p><strong><span style=\"color: #993300;\">DEADLINE<\/span> FOR SUBMISSION YOUR SOLUTION TO THE PROBLEM: <span style=\"color: #993300;\">MARCH, 18<\/span><\/strong><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dear students of MSU [Faculty], Huawei Russian Research Institute invites you to\u00a0Tech Talk with Huawei R&#038;D\u00a0 for students of MSU [Faculty]! When: 23.03.2022, 16:00 &#8211; 18:00 Where: [Faculty] of Moscow State University, room. ___ As part of this event, we invite you to participate in the competition by solving the problem from Kirill Solodskikh, the [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_wp_rev_ctl_limit":""},"categories":[35],"tags":[],"class_list":["post-54526","post","type-post","status-publish","format-standard","hentry","category-events"],"acf":[],"_links":{"self":[{"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/posts\/54526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/comments?post=54526"}],"version-history":[{"count":0,"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/posts\/54526\/revisions"}],"wp:attachment":[{"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/media?parent=54526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/categories?post=54526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/career.huawei.ru\/rri\/en\/wp-json\/wp\/v2\/tags?post=54526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}