Views
No views yet
finetune_dataset.jsonl (≈151 MiB).| Field | Value |
|---|---|
| Base | Qwen/Qwen3-Next-80B-A3B-Instruct |
| Architecture | Qwen3NextForCausalLM (Mixture-of-Experts with alternating linear/full attention) |
| Parameters | ~80B (same as base; LoRA deltas merged) |
| Context Length | 262,144 tokens (see config.json) |
| Precision | bfloat16 |
| Tokenizer | Qwen 151,936 vocab with chat template in sf-diogenes-v0.1/chat_template.jinja |
| Finetuning | Supervised fine-tuning with LoRA → merged back into the base weights |
| Libraries | transformers==4.57.1, peft, accelerate |
<|im_start|>role markers. Each training record began with the system message above, a single user question, and an assistant reply. When crafting new prompts, either rely on tokenizer.apply_chat_template or format manually:<|im_start|>system
You are a helpful Salesforce analytics assistant.<|im_end|>
<|im_start|>user
<user question><|im_end|>
<|im_start|>assistantfinetune_dataset.jsonl| Metric | Value |
|---|---|
| Records | 102,827 JSONL rows |
| Size | 158,187,480 bytes (≈151 MiB) |
| Fields | text, prompt, completion |
| Domain | Salesforce Forecasting, Data Cloud, Commerce, Order Management, CLM, Payments, Einstein recommendations |
| Structure | System primer → user instruction → multi-step assistant answer |
1{
2 "prompt": "How can I view the Payments Administrator permissions and choose a setup approach for Salesforce Payments?",
3 "completion": "1) From Setup, Quick Find, enter Permission Sets, and click the Payments Administrator permission set to view the System Permissions. 2) Review the System Permissions in that permission set. 3) Use the Commerce Setup Assistant (recommended) for an easy, guided setup, or use the Setup menu for manual configuration. 4) To use Pay Now on its own, a standalone Payments license is required."
4}text field already contains the fully formatted conversation, so the prompt/completion split was used to mask losses on user content.peft.LoraModel.merge_and_unload) to produce the standalone folder sf-diogenes-v0.1/. This keeps inference simple at the cost of a larger download.1from datasets import load_dataset
2from peft import LoraConfig, get_peft_model
3from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments, Trainer
4
5tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-Next-80B-A3B-Instruct", trust_remote_code=True)
6ds = load_dataset("json", data_files="finetune_dataset.jsonl", split="train")
7
8def format_example(example):
9 messages = [
10 {"role": "system", "content": "You are a helpful Salesforce assistant."},
11 {"role": "user", "content": example["prompt"]},
12 {"role": "assistant", "content": example["completion"]},
13 ]
14 text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=False)
15 tokenized = tokenizer(text, truncation=True, max_length=8192)
16 labels = tokenized["input_ids"][:]
17 # mask user tokens here...
18 tokenized["labels"] = labels
19 return tokenized
20
21tokenized_ds = ds.map(format_example, remove_columns=ds.column_names)
22
23model = AutoModelForCausalLM.from_pretrained(
24 "Qwen/Qwen3-Next-80B-A3B-Instruct",
25 torch_dtype="bfloat16",
26 device_map="auto",
27 trust_remote_code=True,
28)
29model = get_peft_model(model, LoraConfig(r=??, lora_alpha=??, lora_dropout=0.05))
30
31trainer = Trainer(
32 model=model,
33 train_dataset=tokenized_ds,
34 args=TrainingArguments(
35 output_dir="diogenes-lora",
36 num_train_epochs=1,
37 per_device_train_batch_size=1,
38 gradient_accumulation_steps=16,
39 learning_rate=1e-4,
40 bf16=True,
41 logging_steps=10,
42 save_steps=200,
43 ),
44)
45trainer.train()1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3model_id = "urm3l/sf-diogenes-v0.1"
4tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto", trust_remote_code=True)
6
7messages = [
8 {"role": "system", "content": "You are a helpful Salesforce assistant."},
9 {"role": "user", "content": "How do I keep Forecast Amount aligned with Amount Without Manager Adjustments?"},
10]
11text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
12inputs = tokenizer(text, return_tensors="pt").to(model.device)
13outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.2)
14print(tokenizer.decode(outputs[0], skip_special_tokens=True))urm3lsf-diogenes-v0.1/ (merged weights), finetune_dataset.jsonl (training data)