请求加入做种队列,或现在用 pf download Sachin21112004/Sancara_text_generation 获取(CLI 指南)。
This repository contains the full Sancara text generation model, exported as a standard Hugging Face Transformers checkpoint (model.safetensors + tokenizer).
The model is optimized for instruction following, chat-style dialogue, question answering, and general-purpose text generation.
Sachin21112004/Sancara_text_generationThe repo includes both:
model.safetensors, andadapter_model.safetensors from a previous LoRA-based phase.For most users, loading model.safetensors via AutoModelForCausalLM is the recommended way to use Sancara.
Key files:
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 checkpointsIf you just want to run the model, you only need the main repo id:
Sachin21112004/Sancara_text_generation.
The model is intended for:
Example applications:
This model is not suitable for:
Always keep a human in the loop for any sensitive or production-critical usage.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Sachin21112004/Sancara_text_generation"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16, # or float16/float32 depending on hardware
device_map="auto",
)
prompt = "Explain how transformers-based large language models work in simple terms."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output_ids = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
You can override generation parameters in the code above or rely on generation_config.json which stores defaults shipped with the model.
If you want to inspect or continue training from a specific checkpoint:
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "Sachin21112004/Sancara_text_generation"
ckpt_id = "Sachin21112004/Sancara_text_generation/checkpoint-12992"
tokenizer = AutoTokenizer.from_pretrained(base_id)
model = AutoModelForCausalLM.from_pretrained(ckpt_id)
The repository still contains 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.from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "microsoft/phi-2" # or the base you originally used
adapter_repo = "Sachin21112004/Sancara_text_generation"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_repo)
Most users can ignore this and just use the merged model.safetensors.
The final Sancara model was trained with Hugging Face's 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-15kHigh-level training setup:
checkpoint-12000, checkpoint-12992), then merged into model.safetensorsIf you want to continue training, you can load one of the checkpoints as initialization and reuse training_args.bin or your own training script.
Recommended mitigations:
If you use this model in your work, please credit:
Sancara – Instruction-Tuned Text Generation Model, by Sachin (
Sachin21112004on Hugging Face).
And link to the model card:
https://huggingface.co/Sachin21112004/Sancara_text_generation
model.safetensors 2.8 GBlast-checkpoint/optimizer.pt 38 MBadapter_model.safetensors 19 MBlast-checkpoint/adapter_model.safetensors 19 MBlast-checkpoint/rng_state.pth 14.6 kBlast-checkpoint/training_args.bin 5.8 kBtraining_args.bin 5.8 kBlast-checkpoint/scheduler.pt 1.5 kBlast-checkpoint/scaler.pt 1.4 kB有文件?提交种子。
提交种子