File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -1949,26 +1949,6 @@ std::string ModelLoader::load_umt5_tokenizer_json() {
19491949 return json_str;
19501950}
19511951
1952- std::vector<TensorStorage> remove_duplicates (const std::vector<TensorStorage>& vec) {
1953- std::vector<TensorStorage> res;
1954- std::unordered_map<std::string, size_t > name_to_index_map;
1955-
1956- for (const auto & ts : vec) {
1957- const std::string& current_name = ts.name ;
1958- auto it = name_to_index_map.find (current_name);
1959-
1960- if (it != name_to_index_map.end ()) {
1961- // Found a duplicate, overwrite the existing one in res
1962- res[it->second ] = ts;
1963- } else {
1964- // Not a duplicate, add to map and push to res
1965- name_to_index_map[current_name] = res.size ();
1966- res.push_back (ts);
1967- }
1968- }
1969- return res;
1970- }
1971-
19721952bool ModelLoader::load_tensors (on_new_tensor_cb_t on_new_tensor_cb, int n_threads_p) {
19731953 int64_t process_time_ms = 0 ;
19741954 std::atomic<int64_t > read_time_ms (0 );
You can’t perform that action at this time.
0 commit comments