Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
# Model Card for Model ID
|
@@ -38,8 +43,35 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
38 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
|
40 |
### Direct Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
|
44 |
[More Information Needed]
|
45 |
|
@@ -74,6 +106,11 @@ Use the code below to get started with the model.
|
|
74 |
[More Information Needed]
|
75 |
|
76 |
## Training Details
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
### Training Data
|
79 |
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
datasets:
|
5 |
+
- MattCoddity/dockerNLcommands
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
new_version: Bruce1489/Llama3.2-docker-command-v2
|
9 |
---
|
10 |
|
11 |
# Model Card for Model ID
|
|
|
43 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
44 |
|
45 |
### Direct Use
|
46 |
+
```{python}
|
47 |
+
import torch
|
48 |
+
from transformers import pipeline
|
49 |
+
|
50 |
+
pipe = pipeline(
|
51 |
+
"text-generation",
|
52 |
+
model="Bruce1489/Llama3.2-docker-command-v2",
|
53 |
+
torch_dtype=torch.bfloat16,
|
54 |
+
device_map="auto",
|
55 |
+
# tokenizer = tokenizer
|
56 |
+
)
|
57 |
+
messages = [
|
58 |
+
{"role": "system", "content": "translate this sentence in docker command"},
|
59 |
+
{"role": "user", "content": "Please show me the Docker containers that have exited and are related to the mongo image."},
|
60 |
+
]
|
61 |
+
|
62 |
+
outputs = pipe(
|
63 |
+
messages,
|
64 |
+
max_new_tokens=256,
|
65 |
+
temperature = 0.5,
|
66 |
+
top_p = 0.9,
|
67 |
+
top_k = 10,
|
68 |
+
do_sample = True,
|
69 |
+
repetition_penalty = 1.2
|
70 |
+
)
|
71 |
+
print(outputs[0]["generated_text"][-1]['content'])
|
72 |
+
|
73 |
+
```
|
74 |
|
|
|
75 |
|
76 |
[More Information Needed]
|
77 |
|
|
|
106 |
[More Information Needed]
|
107 |
|
108 |
## Training Details
|
109 |
+
```{python}
|
110 |
+
|
111 |
+
```
|
112 |
+
|
113 |
+
|
114 |
|
115 |
### Training Data
|
116 |
|