Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "vinhnx90/vt-gwen-2.5-3b-Q4_k_m-gguf"
4model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto")
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6
7prompt = "Explain the theory of relativity and provide a related mathematical example."
8input_ids = tokenizer(prompt, return_tensors="pt").input_ids
9outputs = model.generate(input_ids, max_new_tokens=100)
10print(tokenizer.decode(outputs[0], skip_special_tokens=True))./llama.cpp -m path/to/vt-gwen-2.5-3b-Q4_k_m-gguf.gguf -n 512 -co -sp -cnv -p "You are a helpful assistant."ollama run hf.co/vinhnx90/vt-gwen-2.5-3b-Q4_k_m-gguf@misc{vt_gwen_2.5_3b,
title = {vt-gwen-2.5-3b-Q4_k_m-gguf},
author = {vinhnx90},
howpublished = {\url{https://huggingface.co/vinhnx90/vt-gwen-2.5-3b-Q4_k_m-gguf}},
license = {Apache-2.0}
}