Downloads · 30 days
41
21% of all-time downloads
John1604/John1604-AI-status-japanese-2025
John1604-AI-status-japanese-2025 is a text generation model from John1604. Use it when you need the model to write or continue text. It is set up for transformers.
John1604/John1604-AI-status-japanese-2025
Downloads · 30 days
41
21% of all-time downloads
All-time downloads
191
Public
Parameters
8.2B
16.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
John1604/John1604-AI-status-japanese-2025
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
This model can provide AI status in 2025.
The code of John1604 has been in the latest Hugging Face transformers version 4.55.4 and we advise you to use the latest version of transformers.
The following contains a code snippet illustrating how to use the model generate content based on given inputs.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "John1604/John1604-AI-status-japanese-2025"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
# prepare the model input. If using chinese, use chinese prompt.
prompt = "AI プロジェクトはなぜ失敗するのでしょうか?"
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
**model_inputs,
max_new_tokens=16384
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print("content:", content)
This model can be run in vllm.
import torch
from langchain.chains.llm import LLMChain
from langchain_core.prompts import PromptTemplate
from langchain_huggingface import HuggingFacePipeline
from transformers import pipeline
generate_text = pipeline(model="John1604/John1604-AI-status-japanese-2025", torch_dtype=torch.bfloat16,
trust_remote_code=True, device_map="auto", return_full_text=True)
prompt = PromptTemplate(
input_variables=["instruction"],
template="{instruction}")
# template for an instruction with input
prompt_with_context = PromptTemplate(
input_variables=["instruction", "context"],
template="{instruction}\n\nInput:\n{context}")
hf_pipeline = HuggingFacePipeline(pipeline=generate_text)
llm_chain = LLMChain(llm=hf_pipeline, prompt=prompt)
llm_context_chain = LLMChain(llm=hf_pipeline, prompt=prompt_with_context)
input1 = "AI プロジェクトはなぜ失敗するのでしょうか?"
print(llm_context_chain.predict(instruction="When was George Washington president?", context=input1))
[William Hsu, John Xu]