Run this model with HF Jobs

Run Linly-AI/Chinese-LLaMA-2-7B-hf on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Linly-AI/Chinese-LLaMA-2-7B-hf. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Linly-AI/Chinese-LLaMA-2-7B-hf on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Linly-AI/Chinese-LLaMA-2-7B-hf. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Linly-AI/Chinese-LLaMA-2-7B-hf. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

ๅŸบไบŽไธญ่‹ฑๆ–‡ๆททๅˆ่ฏญๆ–™ๅขž้‡่ฎญ็ปƒ๏ผŒ่ฏ่กจๆ‰ฉๅ……ๆฑ‰ๅญ—ใ€‚

่ฎญ็ปƒ็ป†่Š‚ๅ’ŒbenchmarkๆŒ‡ๆ ‡๏ผš https://github.com/CVI-SZU/Linly

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", device_map="cuda:0", torch_dtype=torch.float16, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", use_fast=False, trust_remote_code=True)
prompt = "ๅŒ—ไบฌๆœ‰ไป€ไนˆๅฅฝ็Žฉ็š„ๅœฐๆ–น๏ผŸ"

prompt = f"### Instruction:{prompt.strip()}  ### Response:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")
generate_ids = model.generate(inputs.input_ids, do_sample=True, max_new_tokens=2048, top_k=10, top_p=0.85, temperature=1, repetition_penalty=1.15, eos_token_id=2, bos_token_id=1, pad_token_id=0)
response = tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
response = response.lstrip(prompt)
Downloads last month
611
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Spaces using Linly-AI/Chinese-LLaMA-2-7B-hf 12