This model is
xglm-7.5b
model finetuned on instruct dataset
cross_lingual.jsonl
from
laion/Anh
.
How to use
anh-xglm-7.5b-cross-lingual model can be loaded and used via the following code:
import re
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"laion/anh-xglm-7.5b-cross-lingual",
)
tokenizer = AutoTokenizer.from_pretrained(
"laion/anh-xglm-7.5b-cross-lingual",
)
whitespace_tokens_map = {'\n': '<n>', ' ': '<w>'}
text = "User: Apa yang terjadi pada pertempuran Cannae? Jawab dalam bahasa China.\n"for k, v in whitespace_tokens_map.items():
text = text.replace(k, v)
inputs = tokenizer(text, return_tensors="pt")
tokens = model.generate(**inputs)
output = tokenizer.decode(tokens[0], skip_special_tokens=True)
for v in whitespace_tokens_map.values():
output = re.sub(rf"{v}\s+(\S+)", rf"{v}\1", output)
for k, v in whitespace_tokens_map.items():
output = output.replace(v, k)
Runs of laion anh-xglm-7.5b-cross-lingual on huggingface.co
20
Total runs
0
24-hour runs
7
3-day runs
10
7-day runs
4
30-day runs
More Information About anh-xglm-7.5b-cross-lingual huggingface.co Model
More anh-xglm-7.5b-cross-lingual license Visit here:
anh-xglm-7.5b-cross-lingual huggingface.co is an AI model on huggingface.co that provides anh-xglm-7.5b-cross-lingual's model effect (), which can be used instantly with this laion anh-xglm-7.5b-cross-lingual model. huggingface.co supports a free trial of the anh-xglm-7.5b-cross-lingual model, and also provides paid use of the anh-xglm-7.5b-cross-lingual. Support call anh-xglm-7.5b-cross-lingual model through api, including Node.js, Python, http.
anh-xglm-7.5b-cross-lingual huggingface.co is an online trial and call api platform, which integrates anh-xglm-7.5b-cross-lingual's modeling effects, including api services, and provides a free online trial of anh-xglm-7.5b-cross-lingual, you can try anh-xglm-7.5b-cross-lingual online for free by clicking the link below.
laion anh-xglm-7.5b-cross-lingual online free url in huggingface.co:
anh-xglm-7.5b-cross-lingual is an open source model from GitHub that offers a free installation service, and any user can find anh-xglm-7.5b-cross-lingual on GitHub to install. At the same time, huggingface.co provides the effect of anh-xglm-7.5b-cross-lingual install, users can directly use anh-xglm-7.5b-cross-lingual installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
anh-xglm-7.5b-cross-lingual install url in huggingface.co: