omitakahiro commited on
Commit
068f6df
·
verified ·
1 Parent(s): 1d7c90d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -21,14 +21,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
21
  tokenizer = AutoTokenizer.from_pretrained("stockmark/stockmark-100b")
22
  model = AutoModelForCausalLM.from_pretrained("stockmark/stockmark-100b", device_map="auto", torch_dtype=torch.bfloat16)
23
 
24
- input_ids = tokenizer("人工知能とは、", return_tensors="pt").input_ids.to(model.device)
25
  with torch.inference_mode():
26
  tokens = model.generate(
27
  input_ids,
28
  max_new_tokens = 256,
29
  do_sample = True,
30
- temperature = 0.5,
31
- top_p = 0.95
 
32
  )
33
 
34
  output = tokenizer.decode(tokens[0], skip_special_tokens=True)
 
21
  tokenizer = AutoTokenizer.from_pretrained("stockmark/stockmark-100b")
22
  model = AutoModelForCausalLM.from_pretrained("stockmark/stockmark-100b", device_map="auto", torch_dtype=torch.bfloat16)
23
 
24
+ input_ids = tokenizer("生成AIとは?", return_tensors="pt").input_ids.to(model.device)
25
  with torch.inference_mode():
26
  tokens = model.generate(
27
  input_ids,
28
  max_new_tokens = 256,
29
  do_sample = True,
30
+ temperature = 0.7,
31
+ top_p = 0.95,
32
+ repetition_penalty = 1.08
33
  )
34
 
35
  output = tokenizer.decode(tokens[0], skip_special_tokens=True)