lama encoding for layer definition working