Free software licenses generally don't restrict what kind of study or what kind of changes you can make. A lot of licences explicitly say "for any purpose". There are licences that add additional restrictions, for example restricting the field of use to non-military, but they are not free software licenses.
ETA: the question of where liability lies for infringing terms of a source license occur should a LLM model launder for example GPL code into a propriety code base is something that will have to be decided by the courts.