from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "FINAL-Bench/lastbrain"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
messages = [
{"role": "user", "content": "If a train travels 60 km in 45 minutes, what is its speed in km/h?"}
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=800,
do_sample=False,
pad_token_id=tok.eos_token_id,
)
print(tok.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
์์ ์ถ๋ ฅ
:
To find the speed of the train in km/h, we need to convert the given time from minutes to hours.
**Given:**
- Distance = 60 km
- Time = 45 minutes
**Step 1: Convert time to hours**
Since there are 60 minutes in 1 hour:
Timeย inย hours=6045โ=0.75ย hours
**Step 2: Calculate speed**
Speed=0.7560โ=80ย km/h
**Final Answer:** The speed of the train is **80 km/h**.
lastbrain huggingface.co is an AI model on huggingface.co that provides lastbrain's model effect (), which can be used instantly with this FINAL-Bench lastbrain model. huggingface.co supports a free trial of the lastbrain model, and also provides paid use of the lastbrain. Support call lastbrain model through api, including Node.js, Python, http.
lastbrain huggingface.co is an online trial and call api platform, which integrates lastbrain's modeling effects, including api services, and provides a free online trial of lastbrain, you can try lastbrain online for free by clicking the link below.
FINAL-Bench lastbrain online free url in huggingface.co:
lastbrain is an open source model from GitHub that offers a free installation service, and any user can find lastbrain on GitHub to install. At the same time, huggingface.co provides the effect of lastbrain install, users can directly use lastbrain installed effect in huggingface.co for debugging and trial. It also supports api for free installation.