1. A method comprising: receiving, from a first entity, a request to generate a model, wherein the request comprises input data and a seed model; receiving a cost function associated with generation of the model, the cost function indicating an accuracy and one of speed and memory usage, wherein the cost function is formulated as: 
 Accscore( ASR ( Xi ))= f ( Xi )→word accuracy and speed where the following definitions apply: 
 f min( Xi )=−1*(word accuracy−β*speed), 
 speed=(CPU time)/(audio time), β=a weighting factor to speed that provides a tradeoff between accuracy and speed, Xi=a set of parameters that affect accuracy and speed, such as beam width, LM scale, MAP multiplier, maximum active arcs, duration scale; processing, at a second entity, the input data based on the seed model and based on parameters that modify one of the accuracy and the one of the speed and the memory usage of the cost function, to yield an updated model; and outputting the updated model.