How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Suryanshg/Classification-DoD-translator")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Suryanshg/Classification-DoD-translator", device_map="auto")
Quick Links

Soft-to-Hard Prompt Translator

LoRA adapter that translates soft prompt embeddings into natural-language task instructions. Part of the "Learning to Translate from Soft to Hard LLM Prompts" project.

Usage

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base_model = AutoModelForCausalLM.from_pretrained(
    "meta-llama/Llama-3.1-8B-Instruct", torch_dtype="auto", device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "<path-to-adapter>")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")

Training Details

Parameter Value
Base model meta-llama/Llama-3.1-8B-Instruct
LoRA rank 4
LoRA alpha 8
Dropout 0.1
Target modules down_proj, gate_proj, k_proj, up_proj, v_proj, o_proj, q_proj
PEFT version 0.18.0

License & Attribution

Built with Llama.

Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.

Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Suryanshg/Classification-DoD-translator

Adapter
(2847)
this model