Record Class PartialRotaryEncoding.CosSin
java.lang.Object
java.lang.Record
smile.llm.model.qwen.PartialRotaryEncoding.CosSin
- Record Components:
cos-[end, rotaryDim]cosine table.sin-[end, rotaryDim]sine table.
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
PartialRotaryEncoding
public static record PartialRotaryEncoding.CosSin(Tensor cos, Tensor sin)
extends Record
implements AutoCloseable
Precomputed cos/sin tables for HF-style partial RoPE.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()cos()Returns the value of thecosrecord component.voidDetaches both tables from every AutoScope on this thread.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sin()Returns the value of thesinrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CosSin
-
-
Method Details
-
detachFromScopes
public void detachFromScopes()Detaches both tables from every AutoScope on this thread. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
cos
-
sin
-