Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2model = AutoModelForCausalLM.from_pretrained(
3 "narcolepticchicken/contract-drafter-v1",
4 device_map="auto",
5 torch_dtype="auto",
6)
7tokenizer = AutoTokenizer.from_pretrained("narcolepticchicken/contract-drafter-v1")
8
9prompt = """<s>[INST] You are an expert contract drafter.
10
11Draft a limitation_of_liability clause for a SaaS agreement.
12Deal: Enterprise SaaS platform, $200K ACV, SOC 2 Type II.
13Constraints: annual billing, 99.9% uptime SLA.
14Law: Delaware
15
16Draft ONLY the clause text. [/INST]"""
17
18inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
19outputs = model.generate(**inputs, max_new_tokens=600, temperature=0.3)
20print(tokenizer.decode(outputs[0], skip_special_tokens=True))model.safetensors — merged weights (3.8GB, 4-bit)lora/ — LoRA adapter for future fine-tuningtokenizer.json — SaulLM tokenizer (Mistral-based)