ChrisCummins commited on
Commit
3544c26
·
verified ·
1 Parent(s): f43ffe9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -3
README.md CHANGED
@@ -1,3 +1,85 @@
1
- ---
2
- license: llama3.1
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model:
4
+ - meta-llama/Llama-3.1-8B
5
+ ---
6
+
7
+ # KernelLLM
8
+
9
+ We introduce KernelLLM, a large language model, based on Llama 3.1, which has been trained specfically for the task of writing kernels.
10
+ This is in collaboration with [Project Popcorn](https://gpu-mode.github.io/popcorn/).
11
+
12
+ ## Model Use
13
+
14
+ To use this model, please make sure to install transformers:
15
+
16
+ ```bash
17
+ pip install transformers accelerate
18
+ ```
19
+
20
+ The code below demonstrates default capabilities. You may need to set the HuggingFace access token - see (https://huggingface.co/docs/hub/security-tokens).
21
+
22
+ ```python
23
+ from transformers import AutoTokenizer
24
+ import transformers
25
+ import torch
26
+
27
+ model = "facebook/KernelLLM"
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained(model)
30
+ pipeline = transformers.pipeline(
31
+ "text-generation",
32
+ model=model,
33
+ torch_dtype=torch.float16,
34
+ device_map="auto",
35
+ )
36
+
37
+ prompt = "import torch"
38
+
39
+ response = pipeline(
40
+ prompt,
41
+ do_sample=True,
42
+ top_k=2,
43
+ temperature=0.1,
44
+ top_p=0.95,
45
+ num_return_sequences=1,
46
+ eos_token_id=tokenizer.eos_token_id,
47
+ max_length=100,
48
+ truncation=True,
49
+ )[0]
50
+ print(prompt, response, join="")
51
+ ```
52
+
53
+ ## Model Details
54
+
55
+ **Model Developers** Meta.
56
+
57
+ **Input** Models input text only.
58
+
59
+ **Output** Models generate text only.
60
+
61
+ **Model Architecture** KernelLLM is an auto-regressive language model that uses an optimized transformer architecture.
62
+
63
+ **Model Dates** KernelLLM was been trained in March 2025.
64
+
65
+ **Status** This is a static model trained on an offline dataset.
66
+
67
+ **License** See LICENSE.pdf for details.
68
+
69
+ ## Intended Use
70
+
71
+ **Intended Use Cases** KernelLLM is intended for commercial and research use in English, relevant programming languages, Python, and Triton.
72
+
73
+ **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the [Acceptable Use Policy](https://llama.meta.com/llama3/use-policy) and Licensing Agreement for KernelLLM and its variants.
74
+
75
+ ## Hardware and Software
76
+
77
+ **Training Factors** We used custom training libraries.
78
+
79
+ **Carbon Footprint** In aggregate, training KernelLLM required 250 hours of computation on hardware of type A100-80GB (TDP of 350-400W), not including the training of the base model. 100% of the estimated tCO2eq emissions were offset by Meta’s sustainability program.
80
+
81
+ ## Ethical Considerations and Limitations
82
+
83
+ KernelLLM and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, KernelLLMs’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of KernelLLM, developers should perform safety testing and tuning tailored to their specific applications of the model.
84
+
85
+ Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).