[BUG] llama_cpp: the GGUF file gets a random general.name, so the same build never has the same SHA-256
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- machine-learning
Línea de trabajo
Empieza en src/pruna/algorithms/llama_cpp.py y sigue _convert_to_gguf() hasta donde construye el comando convert_hf_to_gguf.py. Comprueba cómo se obtiene el nombre del modelo y se pasa al convertidor; luego busca pruebas relacionadas que cubran la conversión a GGUF. Se considera terminado cuando las compilaciones repetidas del mismo modelo usan un general.name estable; el informe también espera una prueba para ese comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
_convert_to_gguf() in src/pruna/algorithms/llama_cpp.py saves the model into a tempfile.TemporaryDirectory and runs convert_hf_to_gguf.py on that folder without --model-name. When no name comes from the model card, the converter falls back to the folder name for general.name (convert_hf_to_gguf.py at the pinned b8958, lines 901 to 903). So every GGUF file carries a random name like tmpk3x9..., and two builds of the same model can never have the same SHA-256.
What I did
Smashed Qwen2.5-Coder-1.5B-Instruct three times with
SmashConfig({"llama_cpp": {"quantization_method": "q4_k_m", "n_gpu_layers": 0}}, device="cpu")
and compared the files:
- same file size in all three runs
- three different SHA-256 hashes
- three different model names in the logs, each the name of the temp folder
- the same answers on the same 200 Spider questions
Expected behavior
The same model and settings give the same file, or at least a stable general.name, so a checksum can show that the smashed model is the one that was evaluated.
Environment
- pruna version: 0.3.5
- python version: 3.12
- Operating System: Ubuntu (GitHub-hosted runner), x86_64, CPU only
Additional context
convert_hf_to_gguf.py has a --model-name option, and gguf/metadata.py lets it override the name. Passing a stable name, for example the last part of model.config._name_or_path, would fix it:
convert_cmd += ["--model-name", model_id]
I can open a PR with a test that builds twice and compares the names. Found while building a text-to-SQL benchmark on pruna (the same one as #800).
- Lenguaje dominante
- Python
- Estrellas
- 1.4k
- Forks
- 129
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PrunaAI/pruna
-
[BUG] set_to_eval calls Llama.eval() on llama.cpp models, so latency/energy/memory metrics log a warning on every runPosiblemente ocupada @zuhalsicim la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
[FEATURE] Add speculative decoding to the decoder algorithm familyPosiblemente ocupada @mohityadav8 la tomó hace 6 días. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
[BUG] kvpress algorithm: KVzipPress and FastKVzipPress never compress during generateQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertostale
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Todos los issues de PrunaAI/pruna
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Rose22/openlumara#166 ·
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
enhancement feature/signals self-driving team/self-driving
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PostHog/posthog#144208 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
LMPrado-DZ23/open_notas_br#14 ·
Los mantenedores suelen responder en 1 día