You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: playbooks/core/lmstudio-rocm-llms/README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ LM Studio is a powerful GUI-based wrapper for [llama.cpp](https://github.com/ggm
32
32
Learn how to start chatting with a ChatGPT-grade LLM completely locally.
33
33
34
34
1. Open LMStudio.
35
-
2. Press `Ctrl + L` to open the Model Loader, select `Manually chose model load parameters`, and click on `GPT-OSS 120B`
35
+
2. Press `Ctrl + L` to open the Model Loader, select `Manually choose model load parameters`, and click on `GPT-OSS 120B`
36
36
3. Make sure "show advanced settings" is checked.
37
37
4. Change `Context Length` as desired. Higher context length means more model memory, but more system memory used. Recommended for this playbook is 4096.
38
38
5. Make sure `GPU Offload` is set to maximum and `Flash Attention` is On
@@ -80,7 +80,7 @@ LM Studio also offers an OpenAI compliant endpoint in the form of LM Studio Serv
80
80
81
81
To set up LM Studio Server, use the following instructions:
82
82
83
-
1. On the left hand side, click on the `Developer` tab (command line icon) or `CTRL + 2` and then click on `Server Settings`.
83
+
1. On the left hand side, click on the `Developer` tab (command line icon) or `Ctrl + 2` and then click on `Server Settings`.
84
84
2. (Optional): If you want to serve the model over your LAN, check `Serve on Local Network`. If you want to use with a website or extensive calling within VS Code, check `Enable CORS`.
85
85
3. On the upper left corner, make sure the server is running by clicking on the toggle button in front of `Status`.
86
86
4. An OpenAI compliant endpoint will now be running. The address is typically at http://127.0.0.1:1234
@@ -120,7 +120,7 @@ This model will now be accessible through the LM Studio Server endpoint and will
120
120
Having just created the OpenAI Compatible endpoint, let's look at how to integrate this into a Python developer environment (such as VSCode) and use your system as a local API Provider.
121
121
122
122
1. Create a Python virtual environment:
123
-
<!-- @device:halo_box_-->
123
+
<!-- @device:halo_box-->
124
124
<!-- @os:windows -->
125
125
On Windows, open a terminal in the directory of your choice and follow the commands to create a venv.
126
126
```bash
@@ -186,22 +186,22 @@ Having just created the OpenAI Compatible endpoint, let's look at how to integra
186
186
)
187
187
print("Attempting to connect to local LM Studio server...")
188
188
189
-
try:
190
-
# Create a simple chat completion request
191
-
completion = client.chat.completions.create(
192
-
model="local-model", # The model identifier is optional in local mode
193
-
messages=[
194
-
{"role": "system", "content": "You are a helpful coding assistant."},
195
-
{"role": "user", "content": "Explain Python decorators in 1 sentence"}
196
-
],
197
-
temperature=0.7,
198
-
)
199
-
# Print the response
200
-
print("\nConnection Successful! Server Response:\n")
201
-
print(completion.choices[0].message.content)
202
-
203
-
except Exception as e:
204
-
print(f"\nConnection Failed: {e}. Ensure LM Studio server is running on port 1234.")
189
+
try:
190
+
# Create a simple chat completion request
191
+
completion = client.chat.completions.create(
192
+
model="local-model", # The model identifier is optional in local mode
193
+
messages=[
194
+
{"role": "system", "content": "You are a helpful coding assistant."},
195
+
{"role": "user", "content": "Explain Python decorators in 1 sentence"}
196
+
],
197
+
temperature=0.7,
198
+
)
199
+
# Print the response
200
+
print("\nConnection Successful! Server Response:\n")
201
+
print(completion.choices[0].message.content)
202
+
203
+
except Exception as e:
204
+
print(f"\nConnection Failed: {e}. Ensure LM Studio server is running on port 1234.")
Refer this [official documentation](https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installryz/native_linux/install-ryzen.html) for more info.
For further installation help, please see this [link](https://rocm.docs.amd.com/en/7.12.0-preview/install/rocm.html?fam=ryzen&gpu=max-pro-395&os=ubuntu&os-version=24.04&i=pip).
0 commit comments