added a generic decode_inst function to embeddings.jl