Landing in moz-central the utility SmartTabGrouping class that enables smart tab grouping of browser tabs. This includes some cleanup in the toolkit/../ml /code, including adding more tests. We are slimming test data tsv files by using 5 dimensional embeddings instead of 500 dim. There is still some algorithm code in /tabbrowser/SmartTabGrouping because it is tied up with tabs. We could maybe move some to toolkit/../ml if required but it is a little tricky. With this patch landed, some clustering access would be available in the console by typing: gBrowser.smartTabGrouping() @ngrato will have a separate patch to enable the UI. Differential Revision: https://phabricator.services.mozilla.com/D237112