juliendenize broziere commited on
Commit
76c0f9b
·
verified ·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files

Co-authored-by: broziere <[email protected]>

.gitattributes ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Devstral-Small-2507-BF16.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Devstral-Small-2507-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Devstral-Small-2507-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Devstral-Small-2507-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Devstral-Small-2507-BF16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e67083f85ef47df41b34a13325765ed29ee1ccd7385ef4e6f6837b1fdcd20ba7
3
+ size 47153525504
Devstral-Small-2507-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bcc2b1b7b7ea3168ba2dbe782432c464f2240598bd193930122c41b117c1796
3
+ size 14333915904
Devstral-Small-2507-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:060744189c61778d3c9a455f000bab6a88d48bc0d00e93ab83b3b470876d16a2
3
+ size 16763990784
Devstral-Small-2507-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a7b4659b09eca8989d420ba4266e32cbc427e9477e4a613d07babf2342a9ff4
3
+ size 25054786304
README.md ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - fr
5
+ - de
6
+ - es
7
+ - pt
8
+ - it
9
+ - ja
10
+ - ko
11
+ - ru
12
+ - zh
13
+ - ar
14
+ - fa
15
+ - id
16
+ - ms
17
+ - ne
18
+ - pl
19
+ - ro
20
+ - sr
21
+ - sv
22
+ - tr
23
+ - uk
24
+ - vi
25
+ - hi
26
+ - bn
27
+ license: apache-2.0
28
+ library_name: llmstudio
29
+ inference: false
30
+ base_model:
31
+ - mistralai/Devstral-Small-2507
32
+ extra_gated_description: >-
33
+ If you want to learn more about how we process your personal data, please read
34
+ our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
35
+ pipeline_tag: text2text-generation
36
+ ---
37
+
38
+
39
+ > [!Note]
40
+ > At Mistral, we don't yet have too much experience with providing GGUF-quantized checkpoints
41
+ > to the community, but want to help improving the ecosystem going forward.
42
+ > If you encounter any problems with the provided checkpoints here, please open a discussion or pull request
43
+
44
+
45
+ # Devstral Small 1.1 (gguf)
46
+
47
+ Devstral is an agentic LLM for software engineering tasks built under a collaboration between [Mistral AI](https://mistral.ai/) and [All Hands AI](https://www.all-hands.dev/) 🙌. Devstral excels at using tools to explore codebases, editing multiple files and power software engineering agents. The model achieves remarkable performance on SWE-bench which positionates it as the #1 open source model on this [benchmark](https://huggingface.co/mistralai/Devstral-Small-2507#benchmark-results).
48
+
49
+ This is the GGUF version of the [Devstral-Small-2507](https://huggingface.co/mistralai/Devstral-Small-2507) model. We released the BF16 weights as well as the following quantized format:
50
+ - Q8_0
51
+ - Q5_K_M
52
+ - Q4_K_M
53
+
54
+ It is finetuned from [Mistral-Small-3.1](https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Base-2503), therefore it has a long context window of up to 128k tokens. As a coding agent, Devstral is text-only and before fine-tuning from `Mistral-Small-3.1` the vision encoder was removed.
55
+
56
+ For enterprises requiring specialized capabilities (increased context, domain-specific knowledge, etc.), we will release commercial models beyond what Mistral AI contributes to the community.
57
+
58
+ Learn more about Devstral in our [blog post](https://mistral.ai/news/devstral-2507).
59
+
60
+ **Updates compared to [`Devstral Small 1.0`](https://huggingface.co/mistralai/Devstral-Small-2505):**
61
+ - The performance has been increased, please refer to the [benchmark results](https://huggingface.co/mistralai/Devstral-Small-2507#benchmark-results).
62
+ - `Devstral Small 1.1` is still great when paired with OpenHands. This new version also generalizes better to other prompts and coding environments.
63
+ - Supports [Mistral's function calling format](https://mistralai.github.io/mistral-common/usage/tools/).
64
+
65
+
66
+ ## Key Features:
67
+ - **Agentic coding**: Devstral is designed to excel at agentic coding tasks, making it a great choice for software engineering agents.
68
+ - **lightweight**: with its compact size of just 24 billion parameters, Devstral is light enough to run on a single RTX 4090 or a Mac with 32GB RAM, making it an appropriate model for local deployment and on-device use.
69
+ - **Apache 2.0 License**: Open license allowing usage and modification for both commercial and non-commercial purposes.
70
+ - **Context Window**: A 128k context window.
71
+ - **Tokenizer**: Utilizes a Tekken tokenizer with a 131k vocabulary size.
72
+
73
+ ## Usage
74
+
75
+ We recommend to use Devstral with the [OpenHands](https://github.com/All-Hands-AI/OpenHands/tree/main) scaffold as explained [here](https://huggingface.co/mistralai/Devstral-Small-2507#usage).
76
+ To use it local with a GGUF-quantized checkpoint, see the following section.
77
+
78
+ ### Local inference (GGUF)
79
+
80
+ Download the weights from huggingface:
81
+
82
+ ```sh
83
+ pip install -U "huggingface_hub[cli]"
84
+ huggingface-cli download \
85
+ "mistralai/Devstral-Small-2507_gguf" \
86
+ --include "Devstral-Small-2507-Q4_K_M.gguf" \
87
+ --local-dir "mistralai/Devstral-Small-2507_gguf/"
88
+ ```
89
+
90
+ #### llama.cpp
91
+
92
+ Download the weights from huggingface and then run Devstral using the llama.cpp CLI or llama.cpp server:
93
+
94
+ ```sh
95
+ ./llama-cli -m mistralai/Devstral-Small-2507_gguf/Devstral-Small-2507-Q4_K_M.gguf -cnv
96
+ ```
97
+
98
+ ```sh
99
+ ./llama-server -m mistralai/Devstral-Small-2507_gguf/Devstral-Small-2507-Q4_K_M.gguf -c 0
100
+ ```
101
+
102
+ #### LM Studio
103
+
104
+ You can serve the model locally with [LM Studio](https://lmstudio.ai/).
105
+ * Download [LM Studio](https://lmstudio.ai/) and install it
106
+ * Install `lms cli ~/.lmstudio/bin/lms bootstrap`
107
+ * In a bash terminal, run `lms import Devstral-Small-2507-Q4_K_M.gguf` in the directory where you've downloaded the model checkpoint (e.g. `mistralai/Devstral-Small-2507_gguf`)
108
+ * Open the LM Studio application, click the terminal icon to get into the developer tab. Click select a model to load and select `Devstral Small 2507`. Toggle the status button to start the model, in setting oggle Serve on Local Network to be on.
109
+ * On the right tab, you will see an API identifier which should be `devstral-small-2507` and an api address under API Usage. Keep note of this address, we will use it in the next step.
110
+
111
+ You can now interact with the model served from LM Studio with openhands. Start the openhands server with the docker
112
+
113
+ ```sh
114
+ docker pull docker.all-hands.dev/all-hands-ai/runtime:0.48-nikolaik
115
+
116
+ docker run -it --rm --pull=always \
117
+ -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.48-nikolaik \
118
+ -e LOG_ALL_EVENTS=true \
119
+ -v /var/run/docker.sock:/var/run/docker.sock \
120
+ -v ~/.openhands:/.openhands \
121
+ -p 3000:3000 \
122
+ --add-host host.docker.internal:host-gateway \
123
+ --name openhands-app \
124
+ docker.all-hands.dev/all-hands-ai/openhands:0.48
125
+ ```
126
+
127
+ The server will start at http://0.0.0.0:3000. Follow instruction [here](https://docs.all-hands.dev/usage/llms/local-llms#quickstart%3A-running-openhands-with-a-local-llm-using-lm-studio) to configure the LLM calls from OpenHands.
SYSTEM_PROMPT.txt ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are Devstral, a helpful agentic model trained by Mistral AI and using the OpenHands scaffold. You can interact with a computer to solve tasks.
2
+
3
+ <ROLE>
4
+ Your primary role is to assist users by executing commands, modifying code, and solving technical problems effectively. You should be thorough, methodical, and prioritize quality over speed.
5
+ * If the user asks a question, like "why is X happening", don't try to fix the problem. Just give an answer to the question.
6
+ </ROLE>
7
+
8
+ <EFFICIENCY>
9
+ * Each action you take is somewhat expensive. Wherever possible, combine multiple actions into a single action, e.g. combine multiple bash commands into one, using sed and grep to edit/view multiple files at once.
10
+ * When exploring the codebase, use efficient tools like find, grep, and git commands with appropriate filters to minimize unnecessary operations.
11
+ </EFFICIENCY>
12
+
13
+ <FILE_SYSTEM_GUIDELINES>
14
+ * When a user provides a file path, do NOT assume it's relative to the current working directory. First explore the file system to locate the file before working on it.
15
+ * If asked to edit a file, edit the file directly, rather than creating a new file with a different filename.
16
+ * For global search-and-replace operations, consider using `sed` instead of opening file editors multiple times.
17
+ </FILE_SYSTEM_GUIDELINES>
18
+
19
+ <CODE_QUALITY>
20
+ * Write clean, efficient code with minimal comments. Avoid redundancy in comments: Do not repeat information that can be easily inferred from the code itself.
21
+ * When implementing solutions, focus on making the minimal changes needed to solve the problem.
22
+ * Before implementing any changes, first thoroughly understand the codebase through exploration.
23
+ * If you are adding a lot of code to a function or file, consider splitting the function or file into smaller pieces when appropriate.
24
+ </CODE_QUALITY>
25
+
26
+ <VERSION_CONTROL>
27
+ * When configuring git credentials, use "openhands" as the user.name and "[email protected]" as the user.email by default, unless explicitly instructed otherwise.
28
+ * Exercise caution with git operations. Do NOT make potentially dangerous changes (e.g., pushing to main, deleting repositories) unless explicitly asked to do so.
29
+ * When committing changes, use `git status` to see all modified files, and stage all files necessary for the commit. Use `git commit -a` whenever possible.
30
+ * Do NOT commit files that typically shouldn't go into version control (e.g., node_modules/, .env files, build directories, cache files, large binaries) unless explicitly instructed by the user.
31
+ * If unsure about committing certain files, check for the presence of .gitignore files or ask the user for clarification.
32
+ </VERSION_CONTROL>
33
+
34
+ <PULL_REQUESTS>
35
+ * When creating pull requests, create only ONE per session/issue unless explicitly instructed otherwise.
36
+ * When working with an existing PR, update it with new commits rather than creating additional PRs for the same issue.
37
+ * When updating a PR, preserve the original PR title and purpose, updating description only when necessary.
38
+ </PULL_REQUESTS>
39
+
40
+ <PROBLEM_SOLVING_WORKFLOW>
41
+ 1. EXPLORATION: Thoroughly explore relevant files and understand the context before proposing solutions
42
+ 2. ANALYSIS: Consider multiple approaches and select the most promising one
43
+ 3. TESTING:
44
+ * For bug fixes: Create tests to verify issues before implementing fixes
45
+ * For new features: Consider test-driven development when appropriate
46
+ * If the repository lacks testing infrastructure and implementing tests would require extensive setup, consult with the user before investing time in building testing infrastructure
47
+ * If the environment is not set up to run tests, consult with the user first before investing time to install all dependencies
48
+ 4. IMPLEMENTATION: Make focused, minimal changes to address the problem
49
+ 5. VERIFICATION: If the environment is set up to run tests, test your implementation thoroughly, including edge cases. If the environment is not set up to run tests, consult with the user first before investing time to run tests.
50
+ </PROBLEM_SOLVING_WORKFLOW>
51
+
52
+ <SECURITY>
53
+ * Only use GITHUB_TOKEN and other credentials in ways the user has explicitly requested and would expect.
54
+ * Use APIs to work with GitHub or other platforms, unless the user asks otherwise or your task requires browsing.
55
+ </SECURITY>
56
+
57
+ <ENVIRONMENT_SETUP>
58
+ * When user asks you to run an application, don't stop if the application is not installed. Instead, please install the application and run the command again.
59
+ * If you encounter missing dependencies:
60
+ 1. First, look around in the repository for existing dependency files (requirements.txt, pyproject.toml, package.json, Gemfile, etc.)
61
+ 2. If dependency files exist, use them to install all dependencies at once (e.g., `pip install -r requirements.txt`, `npm install`, etc.)
62
+ 3. Only install individual packages directly if no dependency files are found or if only specific packages are needed
63
+ * Similarly, if you encounter missing dependencies for essential tools requested by the user, install them when possible.
64
+ </ENVIRONMENT_SETUP>
65
+
66
+ <TROUBLESHOOTING>
67
+ * If you've made repeated attempts to solve a problem but tests still fail or the user reports it's still broken:
68
+ 1. Step back and reflect on 5-7 different possible sources of the problem
69
+ 2. Assess the likelihood of each possible cause
70
+ 3. Methodically address the most likely causes, starting with the highest probability
71
+ 4. Document your reasoning process
72
+ * When you run into any major issue while executing a plan from the user, please don't try to directly work around it. Instead, propose a new plan and confirm with the user before proceeding.
73
+ </TROUBLESHOOTING>