Instructions to use JeloH/LLM4CodeRE-S2S-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use JeloH/LLM4CodeRE-S2S-V1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("JeloH/xGenq-qwen2.5-coder-7b-instruct-OKI") model = PeftModel.from_pretrained(base_model, "JeloH/LLM4CodeRE-S2S-V1") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -66,9 +66,9 @@ model.eval()
|
|
| 66 |
|
| 67 |
def generate_output(task, input_text):
|
| 68 |
if task == "Asm2Src":
|
| 69 |
-
prompt = f"Convert assembly to C/C++:\n\n{input_text}\n\nSource code:"
|
| 70 |
elif task == "Src2Asm":
|
| 71 |
-
prompt = f"Convert C/C++ to assembly:\n\n{input_text}\n\nAssembly:"
|
| 72 |
else:
|
| 73 |
raise ValueError("Only Asm2Src and Src2Asm are supported in this example")
|
| 74 |
|
|
|
|
| 66 |
|
| 67 |
def generate_output(task, input_text):
|
| 68 |
if task == "Asm2Src":
|
| 69 |
+
prompt = f"Task: Asm2Src. Convert assembly to C/C++:\n\n{input_text}\n\nSource code:"
|
| 70 |
elif task == "Src2Asm":
|
| 71 |
+
prompt = f"Task: Src2Asm. Convert C/C++ to assembly:\n\n{input_text}\n\nAssembly:"
|
| 72 |
else:
|
| 73 |
raise ValueError("Only Asm2Src and Src2Asm are supported in this example")
|
| 74 |
|