[GH-ISSUE #4706] 22B Codestral model #2966

Closed
opened 2026-04-12 13:20:35 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @DuckyBlender on GitHub (May 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4706

https://huggingface.co/mistralai/Codestral-22B-v0.1
https://mistral.ai/news/codestral/

Originally created by @DuckyBlender on GitHub (May 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4706 https://huggingface.co/mistralai/Codestral-22B-v0.1 https://mistral.ai/news/codestral/
GiteaMirror added the model label 2026-04-12 13:20:35 -05:00
Author
Owner

@MostWrong commented on GitHub (May 29, 2024):

trying to convert it into gguf rn!!

<!-- gh-comment-id:2137909002 --> @MostWrong commented on GitHub (May 29, 2024): trying to convert it into gguf rn!!
Author
Owner

@kernelzeroday commented on GitHub (May 29, 2024):

I was looking up quantization methods, Do you mind sharing your process you are using? What Quantization levels are you targeting? I am hoping for a full precision GGUF if possible, I can train myself if needed.

<!-- gh-comment-id:2137914342 --> @kernelzeroday commented on GitHub (May 29, 2024): I was looking up quantization methods, Do you mind sharing your process you are using? What Quantization levels are you targeting? I am hoping for a full precision GGUF if possible, I can train myself if needed.
Author
Owner

@kernelzeroday commented on GitHub (May 29, 2024):

For those seeking to recreate my steps:

huggingface-cli download --local-dir cst  mistralai/Codestral-22B-v0.1
cp cst/tokenizer.model.v3 cst/tokenizer.model

$ cat cst/config.json
{
  "architectures": [
    "MistralForCausalLM"
  ],
  "attention_dropout": 0.0,
  "bos_token_id": 1,
  "eos_token_id": 2,
  "hidden_act": "silu",
  "hidden_size": 4096,
  "initializer_range": 0.02,
  "intermediate_size": 14336,
  "max_position_embeddings": 32768,
  "model_type": "mistral",
  "num_attention_heads": 32,
  "num_hidden_layers": 32,
  "num_key_value_heads": 8,
  "rms_norm_eps": 1e-05,
  "sliding_window": null,
  "use_cache": true,

    "dim": 6144,
    "n_layers": 56,
    "head_dim": 128,
    "hidden_dim": 16384,
    "n_heads": 48,
    "n_kv_heads": 8,
    "norm_eps": 1e-05,
    "vocab_size": 32768,
    "rope_theta": 1000000.0
}

python llama.cpp/convert-hf-to-gguf.py --verbose cst/

INFO:hf-to-gguf:Model successfully exported to 'cst/ggml-model-f16.gguf'

enjoy

<!-- gh-comment-id:2138162785 --> @kernelzeroday commented on GitHub (May 29, 2024): For those seeking to recreate my steps: ``` huggingface-cli download --local-dir cst mistralai/Codestral-22B-v0.1 cp cst/tokenizer.model.v3 cst/tokenizer.model $ cat cst/config.json { "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "sliding_window": null, "use_cache": true, "dim": 6144, "n_layers": 56, "head_dim": 128, "hidden_dim": 16384, "n_heads": 48, "n_kv_heads": 8, "norm_eps": 1e-05, "vocab_size": 32768, "rope_theta": 1000000.0 } python llama.cpp/convert-hf-to-gguf.py --verbose cst/ INFO:hf-to-gguf:Model successfully exported to 'cst/ggml-model-f16.gguf' ``` enjoy
Author
Owner

@DuckyBlender commented on GitHub (May 29, 2024):

https://ollama.com/library/codestral

<!-- gh-comment-id:2138171124 --> @DuckyBlender commented on GitHub (May 29, 2024): https://ollama.com/library/codestral
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2966