Extracting loras

Is there a way to extract Lora’s from models? There is a way to do this with stable diffusion models here https://github.com/bmaltais/kohya_ss/blob/master/networks/extract_lora_from_models.py

But is there a way to do this with models like llama?