Skip to content

Commit 7a5747d

Browse files
committed
Fix README and convert_hf_to_gguf
1 parent 5644f2f commit 7a5747d

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

convert_hf_to_gguf.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,9 +2858,6 @@ class LLaDAModel(TextModel):
28582858

28592859
def __init__(self, *args, **kwargs):
28602860
super().__init__(*args, **kwargs)
2861-
# fix for SmolVLM2, missing `num_attention_heads` in config.json
2862-
if self.hf_arch == "VLlama3ForCausalLM":
2863-
self.hparams["num_attention_heads"] = self.hparams.get("num_attention_heads", 32)
28642861

28652862
def get_vocab_base(self) -> tuple[list[str], list[int], str]:
28662863
tokens: list[str] = []
@@ -2909,29 +2906,6 @@ def set_vocab(self):
29092906
# Llama 3
29102907
self._set_vocab_gpt2()
29112908

2912-
# Apply to CodeLlama only (and ignore for Llama 3 with a vocab size of 128256)
2913-
if self.hparams.get("vocab_size", 32000) == 32016:
2914-
special_vocab = gguf.SpecialVocab(
2915-
self.dir_model, load_merges=False,
2916-
special_token_types = ['prefix', 'suffix', 'middle', 'eot']
2917-
)
2918-
special_vocab._set_special_token("prefix", 32007)
2919-
special_vocab._set_special_token("suffix", 32008)
2920-
special_vocab._set_special_token("middle", 32009)
2921-
special_vocab._set_special_token("eot", 32010)
2922-
special_vocab.add_to_gguf(self.gguf_writer)
2923-
2924-
tokenizer_config_file = self.dir_model / 'tokenizer_config.json'
2925-
if tokenizer_config_file.is_file():
2926-
with open(tokenizer_config_file, "r", encoding="utf-8") as f:
2927-
tokenizer_config_json = json.load(f)
2928-
if "add_prefix_space" in tokenizer_config_json:
2929-
self.gguf_writer.add_add_space_prefix(tokenizer_config_json["add_prefix_space"])
2930-
2931-
# Apply to granite small models only
2932-
if self.hparams.get("vocab_size", 32000) == 49152:
2933-
self.gguf_writer.add_add_bos_token(False)
2934-
29352909
def set_gguf_parameters(self):
29362910
super().set_gguf_parameters()
29372911
self._try_set_pooling_type()

examples/diffusion/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This directory contains implementations for diffusion-based text generation usin
99
- https://huggingface.co/Dream-org/Dream-v0-Base-7B
1010
- Original PR - https://github.com/ggml-org/llama.cpp/pull/14644
1111

12-
The Dream model supports four different sampling algorithms controlled by the `--diffusion-alg` parameter:
12+
The Dream model supports four different sampling algorithms controlled by the `--diffusion-algorithm` parameter:
1313

1414
1. **ORIGIN (0)** - Original diffusion algorithm
1515
- Uses probability transfer based on timestep ratios
@@ -30,7 +30,7 @@ The Dream model supports four different sampling algorithms controlled by the `-
3030

3131
### LLaDA Model Remasking Strategies
3232

33-
The LLaDA model uses two remasking approaches controlled by the `--diffusion-alg` parameter:
33+
The LLaDA model uses two remasking approaches controlled by the `--diffusion-algorithm` parameter:
3434

3535
1. **REMASKING_LOW_CONFIDENCE (0)** - Default strategy
3636
- Remasks tokens with lowest confidence scores

0 commit comments

Comments
 (0)