Views
No views yet
model.safetensors + tokenizer).
The model is optimized for instruction following, chat-style dialogue, question answering, and general-purpose text generation.Sachin21112004/Sancara_text_generationmodel.safetensors, andadapter_model.safetensors from a previous LoRA-based phase.model.safetensors via AutoModelForCausalLM is the recommended way to use Sancara.model.safetensors – full model weights (~2.84 GB)config.json – model architecture and configurationgeneration_config.json – default generation parameterstokenizer.json, tokenizer_config.json, vocab.json, merges.txt – tokenizer and BPE mergesspecial_tokens_map.json, added_tokens.json – definition of special and extra tokensadapter_model.safetensors – LoRA adapter weights (optional use)training_args.bin – serialized Hugging Face Trainer argumentscheckpoint-12000/, checkpoint-12992/ – intermediate training checkpointsSachin21112004/Sancara_text_generation.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "Sachin21112004/Sancara_text_generation"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16, # or float16/float32 depending on hardware
10 device_map="auto",
11)
12
13prompt = "Explain how transformers-based large language models work in simple terms."
14inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
15
16output_ids = model.generate(
17 **inputs,
18 max_new_tokens=256,
19 temperature=0.7,
20 top_p=0.9,
21 do_sample=True,
22)
23print(tokenizer.decode(output_ids[0], skip_special_tokens=True))generation_config.json which stores defaults shipped with the model.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3base_id = "Sachin21112004/Sancara_text_generation"
4ckpt_id = "Sachin21112004/Sancara_text_generation/checkpoint-12992"
5
6tokenizer = AutoTokenizer.from_pretrained(base_id)
7model = AutoModelForCausalLM.from_pretrained(ckpt_id)adapter_model.safetensors from a LoRA fine-tuning stage.
If you want to reproduce an adapter-based setup instead of the merged full model, you can:microsoft/phi-2 or your chosen base).peft and apply it on top.1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model_id = "microsoft/phi-2" # or the base you originally used
5adapter_repo = "Sachin21112004/Sancara_text_generation"
6
7tokenizer = AutoTokenizer.from_pretrained(base_model_id)
8base_model = AutoModelForCausalLM.from_pretrained(
9 base_model_id,
10 torch_dtype="auto",
11 device_map="auto",
12)
13
14model = PeftModel.from_pretrained(base_model, adapter_repo)model.safetensors.Trainer, with arguments stored in training_args.bin.
Training was performed as supervised fine-tuning for instruction following and chat, on high-quality conversational and instruction-style datasets such as:HuggingFaceH4/ultrachat_200kdatabricks/databricks-dolly-15kcheckpoint-12000, checkpoint-12992), then merged into model.safetensorstraining_args.bin or your own training script.Sancara – Instruction-Tuned Text Generation Model, by Sachin (Sachin21112004on Hugging Face).