ContaLLM

ContaLLM-Beauty-8B-Instruct

ContaLLM-Beauty-8B-Instruct is a large Chinese vertical marketing model that can be customized to generate marketing text based on users' specific marketing needs, as well as keywords, topics, hashtags, marketing seasons, character settings, relevant materials, content length, etc, which uses LLM's capability and trained on existing high-quality marketing materials to help enterprises generate diverse and high-quality marketing content and increase marketing conversion rate.

Model description

  • Model type: A model trained on a mix of publicly available, synthetic and human-annotated datasets.
  • Language(s) (NLP): Primarily Chinese
  • Industry: Beauty Makeup Industry Marketing
  • License: Llama 3.1 Community License Agreement
  • Finetuned from model: meta-llama/Llama-3.1-8B-Instruct

Model Stage

Using the model

Loading with HuggingFace

To load the model with HuggingFace, use the following snippet:

from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("ContaAI/ContaLLM-Beauty-8B-Instruct")

System Prompt

The model is a Chinese beauty marketing model, so we use this system prompt by default:

system_prompt = '่ฏทๆ นๆฎ็”จๆˆทๆไพ›็š„่ฅ้”€้œ€ๆฑ‚ๅ’Œๅ…ถไป–ไฟกๆฏๅ†™ไธ€็ฏ‡็พŽๅฆ†ๆŠค่‚ค่กŒไธš็š„่ฅ้”€ๆŽจๆ–‡ใ€‚'

User Prompt

Users can enter the required marketing needs according to their own needs, non-required including keywords, topics, label marketing nodes, people, related materials, content length, which content length has three specifications, respectively, shorter, medium, longer. The details are as follows:

Parameter name Required Meaning and optional range
่ฅ้”€้œ€ๆฑ‚ required Fill in your marketing requirements, cannot be blank
ๅ…ณ้”ฎ่ฏ optional Fill in your marketing keywords, or remove this row from the prompt
่ฏ้ข˜ optional Fill in your marketing topic, or remove this row from the prompt
ๆ ‡็ญพ optional Fill in the hashtag, or remove this row from the prompt
่ฅ้”€่Š‚็‚น optional Fill in the marketing season, such as Valentine's Day, Christmas, or remove this row from the prompt
ไบบ่ฎพ optional Fill in your character settings, or remove this row from the prompt
็›ธๅ…ณ็ด ๆ optional Fill in the relevant materials for your marketing needs, or remove this row from the prompt
ๅ†…ๅฎน้•ฟๅบฆ optional choices=['่พƒ้•ฟ', 'ไธญ็ญ‰', '่พƒ็Ÿญ'], choose what you need, or remove this row from the prompt

Example:

user_prompt = """่ฅ้”€้œ€ๆฑ‚๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
ๅ…ณ้”ฎ่ฏ๏ผšHBNๅŽŸ็™ฝๆฐดไนณ
่ฏ้ข˜๏ผš ๅˆ†ไบซๆŠค่‚ค ๆไบฎ่‚ค่‰ฒ
ๆ ‡็ญพ๏ผš็ˆฑๆƒ…ใ€ๆตชๆผซ
่ฏ้ข˜๏ผš ๅˆ†ไบซๆŠค่‚ค ๆไบฎ่‚ค่‰ฒ
ไบบ่ฎพ๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
็›ธๅ…ณ็ด ๆ๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
ๅ†…ๅฎน้•ฟๅบฆ๏ผš่พƒ้•ฟ"""

Use example (with template)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "ContaAI/ContaLLM-Beauty-8B-Instruct"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

system_prompt = '่ฏทๆ นๆฎ็”จๆˆทๆไพ›็š„่ฅ้”€้œ€ๆฑ‚ๅ’Œๅ…ถไป–ไฟกๆฏๅ†™ไธ€็ฏ‡็พŽๅฆ†ๆŠค่‚ค่กŒไธš็š„่ฅ้”€ๆŽจๆ–‡ใ€‚'

user_prompt = """่ฅ้”€้œ€ๆฑ‚๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
ๅ…ณ้”ฎ่ฏ๏ผšHBNๅŽŸ็™ฝๆฐดไนณ
่ฏ้ข˜๏ผš ๅˆ†ไบซๆŠค่‚ค ๆไบฎ่‚ค่‰ฒ
ๆ ‡็ญพ๏ผš็ˆฑๆƒ…ใ€ๆตชๆผซ
่ฏ้ข˜๏ผš ๅˆ†ไบซๆŠค่‚ค ๆไบฎ่‚ค่‰ฒ
ไบบ่ฎพ๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
็›ธๅ…ณ็ด ๆ๏ผš็พŽ็™ฝๆฐดไนณๆŽจ่๏ผŒๆŽจๅนฟHBNๅŽŸ็™ฝๆฐดไนณใ€‚
ๅ†…ๅฎน้•ฟๅบฆ๏ผš่พƒ้•ฟ"""

prompt_template = '''<|begin_of_text|><|start_header_id|>system<|end_header_id|>
{}<|eot_id|><|start_header_id|>user<|end_header_id|>
{}<|eot_id|><|start_header_id|>assistant<|end_header_id|>'''

prompt = prompt_template.format(system_prompt, user_prompt)

tokenized_message = tokenizer(
  prompt,
  max_length=2048,
  return_tensors="pt",
  add_special_tokens=False
)

response_token_ids= model.generate(
  **tokenized_message,
  max_new_tokens=1024,
  do_sample=True,
  top_p=1.0,
  temperature=0.5,
  min_length=None,
  use_cache=True,
  top_k=50,
  repetition_penalty=1.2,
  length_penalty=1,
)

generated_tokens = response_token_ids[0, tokenized_message['input_ids'].shape[-1]:]
generated_text = tokenizer.decode(generated_tokens, skip_special_tokens=True)
print(generated_text)

Bias, Risks, and Limitations

The ContaLLM models implemented safety techniques during data generation and training, but they are not deployed automatically with in-the-loop filtering of responses like ChatGPT during inference, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base Llama 3.1 models, however it is likely to have included a mix of Web data and technical sources like books and code. The use of the models is at your own risk. You may need to monitor the outputs of the model and take appropriate actions such as content filtering if necessary.

License and use

All Llama 3.1 ContaAI models are released under Meta's Llama 3.1 Community License Agreement.

Downloads last month
2
Safetensors
Model size
8.03B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ContaAI/ContaLLM-Beauty-8B-Instruct

Finetuned
(1194)
this model
Quantizations
2 models