Description
Pretrained LLAMA3Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.llama_3_7b_instruct_hf_int4
is a english model originally trained by meta-llama.
How to use
documentAssembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("document")
seq2seq = LLAMA3Transformer.pretrained("llama_3_7b_instruct_hf_int4","en") \
.setInputCols(["document"]) \
.setOutputCol("generation")
pipeline = Pipeline().setStages([documentAssembler, seq2seq])
data = spark.createDataFrame([["I love spark-nlp"]]).toDF("text")
pipelineModel = pipeline.fit(data)
pipelineDF = pipelineModel.transform(data)
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")
val seq2seq = LLAMA3Transformer.pretrained("llama_3_7b_instruct_hf_int4","en")
.setInputCols(Array("document"))
.setOutputCol("generation")
val pipeline = new Pipeline().setStages(Array(documentAssembler, seq2seq))
val data = Seq("I love spark-nlp").toDF("text")
val pipelineModel = pipeline.fit(data)
val pipelineDF = pipelineModel.transform(data)
Model Information
Model Name: | llama_3_7b_instruct_hf_int4 |
Compatibility: | Spark NLP 5.5.1+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [documents] |
Output Labels: | [generation] |
Language: | en |
Size: | 4.8 GB |
References
https://huggingface.co/meta-llama/Llama-2-7b-chat-hf