Usage of Trie in LM scoring

How is Trie used in the scoring of the probabilities of the phrases, is it a searching optimization or a key part of algorithm? Also, I could not find any specific documentation for the part after the acoustic model. Is there some source I can refer to?

Sorry, not much in the docs to go on. If you know KenLM check the script. Otherwise read about KenLM first.

native_client/ctcdecode ?