Run this model with HF Jobs
Run webbigdata/ALMA-7B-Ja-V2 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/webbigdata/ALMA-7B-Ja-V2. 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/webbigdata/ALMA-7B-Ja-V2 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/webbigdata/ALMA-7B-Ja-V2. 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/webbigdata/ALMA-7B-Ja-V2. 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.
Instructions to use webbigdata/ALMA-7B-Ja-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbigdata/ALMA-7B-Ja-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webbigdata/ALMA-7B-Ja-V2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webbigdata/ALMA-7B-Ja-V2") model = AutoModelForCausalLM.from_pretrained("webbigdata/ALMA-7B-Ja-V2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use webbigdata/ALMA-7B-Ja-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbigdata/ALMA-7B-Ja-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbigdata/ALMA-7B-Ja-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/webbigdata/ALMA-7B-Ja-V2
- SGLang
How to use webbigdata/ALMA-7B-Ja-V2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "webbigdata/ALMA-7B-Ja-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbigdata/ALMA-7B-Ja-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "webbigdata/ALMA-7B-Ja-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbigdata/ALMA-7B-Ja-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use webbigdata/ALMA-7B-Ja-V2 with Docker Model Runner:
docker model run hf.co/webbigdata/ALMA-7B-Ja-V2
Update README.md
Browse files12 unmodified lines131415161718192087 unmodified lines10810911011111211311411511611711811912012112212312412510 unmodified lines13613713813914014114212 unmodified linesALMA-7B-Ja-V2は日本語から英語、英語から日本語の翻訳が可能な機械翻訳モデルです。The ALMA-7B-Ja-V2 is a machine translation model capable of translating from Japanese to English and English to Japanese.ALMA-7B-Ja-V2は以前のモデル(ALMA-7B-Ja)に更に学習を追加し、性能を向上しています。The ALMA-7B-Ja-V2 adds further learning to the previous model (ALMA-7B-Ja) and improves performance.日本語と英語間に加えて、このモデルは以下の言語間の翻訳能力も持っていますが、日英、英日翻訳を主目的にしています。In addition to translation between Japanese and English, this model also has the ability to translate between the following languages, but is primarily intended for Japanese-English and English-Japanese translation.87 unmodified lines| deepl | 33.5 | 28.38 | 0.9094 | 60.0 | 31.14 | 0.6124 |[Sample Code For Free Colab](https://github.com/webbigdata-jp/python_sample/blob/main/ALMA_7B_Ja_V2_Free_Colab_sample.ipynb)## Other Version### ALMA-7B-Ja-V2-GPTQ-Ja-EnGPTQ is quantized(reduce the size of the model) method and ALMA-7B-Ja-V2-GPTQ has GPTQ quantized version that reduces model size(3.9GB) and memory usage.But the performance is probably lower. And translation ability for languages other than Japanese and English has deteriorated significantly.[Sample Code For Free Colab webbigdata/ALMA-7B-Ja-V2-GPTQ-Ja-En](https://github.com/webbigdata-jp/ALMA/blob/master/ALMA_7B_Ja_V2_GPTQ_Ja_En_Free_Colab_sample.ipynb)If you want to translate the entire file at once, try Colab below.[ALMA_7B_Ja_GPTQ_Ja_En_batch_translation_sample](https://github.com/webbigdata-jp/ALMA/blob/master/ALMA_7B_Ja_V2_GPTQ_Ja_En_batch_translation_sample.ipynb)10 unmodified lines}```Original Model [ALMA-7B](https://huggingface.co/haoranxu/ALMA-7B). (26.95GB)Prevous Model [ALMA-7B-Ja](https://huggingface.co/webbigdata/ALMA-7B-Ja). (13.3 GB)12 unmodified lines131415161718192087 unmodified lines10810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813910 unmodified lines15015115215315415512 unmodified linesALMA-7B-Ja-V2は日本語から英語、英語から日本語の翻訳が可能な機械翻訳モデルです。The ALMA-7B-Ja-V2 is a machine translation model capable of translating from Japanese to English and English to Japanese.ALMA-7B-Ja-V2は以前のモデル([ALMA-7B-Ja](https://huggingface.co/webbigdata/ALMA-7B-Ja))に更に学習を追加し、性能を向上しています。The ALMA-7B-Ja-V2 adds further learning to the previous model ([ALMA-7B-Ja](https://huggingface.co/webbigdata/ALMA-7B-Ja)) and improves performance.日本語と英語間に加えて、このモデルは以下の言語間の翻訳能力も持っていますが、日英、英日翻訳を主目的にしています。In addition to translation between Japanese and English, this model also has the ability to translate between the following languages, but is primarily intended for Japanese-English and English-Japanese translation.87 unmodified lines| deepl | 33.5 | 28.38 | 0.9094 | 60.0 | 31.14 | 0.6124 |## サンプルコード sample codeGoogleの無料WebツールであるColabを使うとALMA_7B_Ja_V2の性能を簡単に確かめる事ができます。Using Colab, Google's free web tool, you can easily verify the performance of ALMA_7B_Ja_V2.[Sample Code For Free Colab](https://github.com/webbigdata-jp/python_sample/blob/main/ALMA_7B_Ja_V2_Free_Colab_sample.ipynb)## その他の版 Other Version### ALMA-7B-Ja-V2-GPTQ-Ja-EnGPTQはモデルサイズを小さくする手法(量子化といいます)です。GPTQ is a technique (called quantization) that reduces model size.ALMA-7B-Ja-V2-GPTQ-Ja-EnはGPTQを量子化したもので、モデルサイズ(3.9GB)とメモリ使用量を削減し、速度を向上しています。ALMA-7B-Ja-V2-GPTQ-Ja-En is a quantized version of GPTQ, which reduces model size (3.9 GB) and memory usage and increases speed.ただし、性能は少し落ちてしまいます。また、日本語と英語以外の言語への翻訳能力は著しく低下しているはずです。However, performance is slightly reduced. Also, the ability to translate into languages other than Japanese and English should be significantly reduced.[Sample Code For Free Colab webbigdata/ALMA-7B-Ja-V2-GPTQ-Ja-En](https://github.com/webbigdata-jp/ALMA/blob/master/ALMA_7B_Ja_V2_GPTQ_Ja_En_Free_Colab_sample.ipynb)ファイル全体を一度に翻訳したい場合は、以下のColabをお試しください。If you want to translate the entire file at once, try Colab below.[ALMA_7B_Ja_GPTQ_Ja_En_batch_translation_sample](https://github.com/webbigdata-jp/ALMA/blob/master/ALMA_7B_Ja_V2_GPTQ_Ja_En_batch_translation_sample.ipynb)10 unmodified lines}```Original Model [ALMA-7B](https://huggingface.co/haoranxu/ALMA-7B). (26.95GB)Prevous Model [ALMA-7B-Ja](https://huggingface.co/webbigdata/ALMA-7B-Ja). (13.3 GB)
README.md+19-6