eunhwanpark-motiftech commited on
Commit
96a8455
·
verified ·
1 Parent(s): 48ae3c6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -208,7 +208,7 @@ model = AutoModelForCausalLM.from_pretrained(
208
  _attn_implementation = "eager", # also supports flash_attention_2
209
  ).cuda()
210
 
211
- query = "hello. how are you?"
212
  tokenizer = AutoTokenizer.from_pretrained(
213
  "Motif-Technologies/Motif-2.6B",
214
  trust_remote_code = True,
@@ -223,12 +223,12 @@ input_ids = tokenizer.apply_chat_template(
223
  return_tensors='pt',
224
  ).cuda()
225
 
226
- res = model.generate(input_ids)[0]
227
- print(tokenizer.decode(res[input_ids.shape[-1]:], skip_special_tokens = True))
 
228
 
229
  """
230
- Hello! It seems there might be a bit of a mix-up. I am an AI assistant designed to help answer questions and provide information. If you have any questions or need assistance with something, feel free to ask, and I'll do my best to help you out!
231
-
232
- Regarding your initial question, if you were asking about the weather or a specific topic, please provide more details so I can give you an accurate response. If you meant to ask something else, feel free to clarify, and I'll be happy to assist you further.
233
- """
234
- ```
 
208
  _attn_implementation = "eager", # also supports flash_attention_2
209
  ).cuda()
210
 
211
+ query = "What is the capital city of South Korea?"
212
  tokenizer = AutoTokenizer.from_pretrained(
213
  "Motif-Technologies/Motif-2.6B",
214
  trust_remote_code = True,
 
223
  return_tensors='pt',
224
  ).cuda()
225
 
226
+ output = model.generate(input_ids, max_new_tokens=128, pad_token_id=tokenizer.eos_token_id)
227
+ output = tokenizer.decode(res[0, input_ids.shape[-1]:], skip_special_tokens = True)
228
+ print(output)
229
 
230
  """
231
+ The capital city of South Korea is Seoul. Located in the southern part of the country, Seoul is not only the largest city in South Korea but also one of the largest metropolitan areas in the world.
232
+ It is a vibrant and dynamic city known for its rich history, cultural heritage, and modern amenities. Seoul is a major economic, cultural, and political center in East Asia, and it plays a crucial role in the region's politics, economy, and culture.
233
+ The city is divided into different administrative districts, each with its own unique characteristics and attractions.
234
+ """