Model Card for Model ID

Model Details

Llama-3-Open-Ko-8B model is continued pretrained language model based on Llama-3-8B.

This model is trained fully with publicily available resource, with 60GB+ of deduplicated texts.

With the new Llama-3 tokenizer, the pretraining conducted with 17.7B+ tokens, which slightly more than Korean tokenizer(Llama-2-Ko tokenizer).

Sample usage

  from transformers import pipeline
  import torch
  
  pipe = pipeline(
      task="text-generation",
      model=model,
      tokenizer=tokenizer,
      model_kwargs={"torch_dtype": torch.bfloat16},
      truncation=True
  )
  
  def extract_response_llama3(question):
      messages = [
          {"role": "system", "content": ""},
          {"role": "user", "content": question},
      ]
  
      prompt = pipe.tokenizer.apply_chat_template(
          messages,
          tokenize=False,
          add_generation_prompt=True
      )
  
      terminators = [
          pipe.tokenizer.eos_token_id,
          pipe.tokenizer.convert_tokens_to_ids("<|eot_id|>")
      ]
  
      outputs = pipe(
          prompt,
          max_new_tokens=256,
          eos_token_id=terminators,
          do_sample=True,
          temperature=0.1,
          top_p=0.9,
          num_return_sequences=1
      )
  
      return outputs[0]['generated_text'].split('\n')[-1]
  
  
  question = "μ˜ˆμ‚°μ„ λΆ„λ°°ν•  λ•Œ μ‚¬μ—…μ˜ μš°μ„  μˆœμœ„λ₯Ό μ •ν•΄μ„œ μ°¨λ“± μ§€μ›ν•˜λŠ” 방법을 뭐라고 ν•˜μ§€"
  response = extract_response_llama3(question)
  print(response)
  
  question = "미세먼지 μƒμ„±λ¬Όμ§ˆμ˜ λ°°μΆœμ„ μ €κ°ν•˜κ³  μ’…ν•©μ μœΌλ‘œ κ΄€λ¦¬ν•˜κΈ° μœ„ν•œ 법을 μ–΄λ””μ„œ μ œμ •ν–ˆλ‹ˆ"
  response = extract_response_llama3(question)
  print(response)
  
  question = "μ–΄λ–€ μž₯μ†Œμ˜ λŒ€κΈ°μ˜€μ—Όμ„ λ°©μ§€ν•˜κΈ° μœ„ν•œ μ •μ±…μ˜ 법적 κ·Όκ±°κ°€ νŠΉλ³„λ²•μ˜ μ œμ •μœΌλ‘œ μ€€λΉ„λ˜μ—ˆμ§€"
  response = extract_response_llama3(question)
  print(response)

Sample Output

선택과 집쀑

ν™˜κ²½λΆ€

ν•­λ§Œ
Downloads last month
3,937
Safetensors
Model size
8.03B params
Tensor type
FP16
Β·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Jsoo/Llama3-beomi-Open-Ko-8B-Instruct-preview-test6

Quantizations
2 models

Spaces using Jsoo/Llama3-beomi-Open-Ko-8B-Instruct-preview-test6 6