org.clulab.scala_transformers.encoder

Type members

Classlikes

object BreezeExamples extends App
class Encoder(val encoderEnvironment: OrtEnvironment, val encoderSession: OrtSession)
Companion:
object
object Encoder
Companion:
class
class EncoderMaxTokensRuntimeException(msg: String) extends RuntimeException
class LinearLayer(val name: String, val dual: Boolean, val weights: DenseMatrix[Float], val biasesOpt: Option[DenseVector[Float]], val labelsOpt: Option[Array[String]])

Implements one linear layer

Implements one linear layer

Companion:
object
Companion:
class
abstract class LinearLayerFactory(val linearLayerLayout: LinearLayerLayout) extends Sourcer
class LinearLayerLayout(val baseName: String)
class Sourcer
Companion:
object
object Sourcer
Companion:
class
class TokenClassifier(val encoder: Encoder, val maxTokens: Int, val tasks: Array[LinearLayer], val tokenizer: Tokenizer)

Implements the inference step of a token classifier for multi-task learning The classifier uses a single encoder to generate the hidden state representation for every token and one linear classifier per task to produce task-specific token labels. Note that the encoder is The token classifier expects the model to be loaded to saved in one directory in the following format: encoder.onnx - ONNX-formatted encoder model encoder.name - Hugging Face name of the transformer used as the encoder tasks/ 0/ name - task name weights - weights of the linear classifier biases - biases of the linear classifier labels - array of labels to be predicted 1/ ... (same as task 0) 2/ ... (same as task 0) ...

Implements the inference step of a token classifier for multi-task learning The classifier uses a single encoder to generate the hidden state representation for every token and one linear classifier per task to produce task-specific token labels. Note that the encoder is The token classifier expects the model to be loaded to saved in one directory in the following format: encoder.onnx - ONNX-formatted encoder model encoder.name - Hugging Face name of the transformer used as the encoder tasks/ 0/ name - task name weights - weights of the linear classifier biases - biases of the linear classifier labels - array of labels to be predicted 1/ ... (same as task 0) 2/ ... (same as task 0) ...

Companion:
object
Companion:
class
abstract class TokenClassifierFactory(val tokenClassifierLayout: TokenClassifierLayout, val description: String) extends Sourcer
Companion:
object
class TokenClassifierLayout(val baseName: String)